Re: [PATCH] fix writing to unintended memory in pkt_generic_packet(); drivers/block/pktcdvd.c

2007-11-06 Thread Al Viro
On Wed, Nov 07, 2007 at 12:14:48AM +0100, Roel Kluin wrote: > Al Viro wrote: > > On Tue, Nov 06, 2007 at 11:43:12PM +0100, Roel Kluin wrote: > >> CDROM_PACKET_SIZE is added as an offset to the pointer to unsigned char > >> cmd[16]. > >> The adjusted pointer is then used as a destination address

Re: [PATCH] fix writing to unintended memory in pkt_generic_packet(); drivers/block/pktcdvd.c

2007-11-06 Thread Roel Kluin
Al Viro wrote: > On Tue, Nov 06, 2007 at 11:43:12PM +0100, Roel Kluin wrote: >> CDROM_PACKET_SIZE is added as an offset to the pointer to unsigned char >> cmd[16]. >> The adjusted pointer is then used as a destination address in a call to >> memset(). However, when CDROM_PACKET_SIZE is added to

Re: [PATCH] fix writing to unintended memory in pkt_generic_packet(); drivers/block/pktcdvd.c

2007-11-06 Thread Al Viro
On Tue, Nov 06, 2007 at 11:43:12PM +0100, Roel Kluin wrote: > CDROM_PACKET_SIZE is added as an offset to the pointer to unsigned char > cmd[16]. > The adjusted pointer is then used as a destination address in a call to > memset(). However, when CDROM_PACKET_SIZE is added to the pointer, it is >

[PATCH] fix writing to unintended memory in pkt_generic_packet(); drivers/block/pktcdvd.c

2007-11-06 Thread Roel Kluin
CDROM_PACKET_SIZE is added as an offset to the pointer to unsigned char cmd[16]. The adjusted pointer is then used as a destination address in a call to memset(). However, when CDROM_PACKET_SIZE is added to the pointer, it is automatically scaled by the size of cmd, which is 16. This results in

Re: [PATCH] fix writing to unintended memory in pkt_generic_packet(); drivers/block/pktcdvd.c

2007-11-06 Thread Al Viro
On Tue, Nov 06, 2007 at 11:43:12PM +0100, Roel Kluin wrote: CDROM_PACKET_SIZE is added as an offset to the pointer to unsigned char cmd[16]. The adjusted pointer is then used as a destination address in a call to memset(). However, when CDROM_PACKET_SIZE is added to the pointer, it is

[PATCH] fix writing to unintended memory in pkt_generic_packet(); drivers/block/pktcdvd.c

2007-11-06 Thread Roel Kluin
CDROM_PACKET_SIZE is added as an offset to the pointer to unsigned char cmd[16]. The adjusted pointer is then used as a destination address in a call to memset(). However, when CDROM_PACKET_SIZE is added to the pointer, it is automatically scaled by the size of cmd, which is 16. This results in

Re: [PATCH] fix writing to unintended memory in pkt_generic_packet(); drivers/block/pktcdvd.c

2007-11-06 Thread Roel Kluin
Al Viro wrote: On Tue, Nov 06, 2007 at 11:43:12PM +0100, Roel Kluin wrote: CDROM_PACKET_SIZE is added as an offset to the pointer to unsigned char cmd[16]. The adjusted pointer is then used as a destination address in a call to memset(). However, when CDROM_PACKET_SIZE is added to the

Re: [PATCH] fix writing to unintended memory in pkt_generic_packet(); drivers/block/pktcdvd.c

2007-11-06 Thread Al Viro
On Wed, Nov 07, 2007 at 12:14:48AM +0100, Roel Kluin wrote: Al Viro wrote: On Tue, Nov 06, 2007 at 11:43:12PM +0100, Roel Kluin wrote: CDROM_PACKET_SIZE is added as an offset to the pointer to unsigned char cmd[16]. The adjusted pointer is then used as a destination address in a call to