[Linux-zigbee-devel] [PATCH] at86rf230: check PHR of inbound packets and make sure frame fits into skb

2011-06-24 Thread Werner Almesberger
The driver used PHR as the frame length without checking its format or compatibility with the skb length. This patch adds a test to reject invalid PHR values (MSB set) and it also rejects frames too big to fit into the skb (which should never happen). Signed-off-by: Werner Almesberger --- drive

[Linux-zigbee-devel] [PATCH 0/1] corruption cause found

2011-06-24 Thread Werner Almesberger
I found the problem that caused the corruptions: PHR wasn't properly vetted. In the patch that follows, I add a test for invalid PHR and for an skb size problem. The latter should never happen, so whether this test makes sense depends on where future driver/stack changes may take us. - Werner Wer

Re: [Linux-zigbee-devel] [PATCH 2/2] at86rf230: initialize unused buffers in struct spi_transfer to NULL

2011-06-24 Thread Werner Almesberger
Dmitry Eremin-Solenikov wrote: > Are you sure about this? Becasue IIRC the C standard, in partial struct > initialization all other fields are zeroed. Could you please verify this? Hmm, you're perfectly right. I didn't know that bit of C99. Sorry for the false alarm. I've set the patch in patchwor

Re: [Linux-zigbee-devel] CC2420 driver fixes

2011-06-24 Thread Dmitry Eremin-Solenikov
On 24.06.2011 13:15, Stefan Schmidt wrote: > Hello. > > On Fri, 2011-06-24 at 12:31, Dmitry Eremin-Solenikov wrote: >> On 6/18/11, Stefan Schmidt wrote: >>> >>> As promised here are some fixes for the cc2420 driver. >>> >>> [PATCH 1/4] ieee802154/cc2420: Check for FCS bit and skip frames >>> >>> I

Re: [Linux-zigbee-devel] CC2420 driver fixes

2011-06-24 Thread Stefan Schmidt
Hello. On Fri, 2011-06-24 at 12:31, Dmitry Eremin-Solenikov wrote: > On 6/18/11, Stefan Schmidt wrote: > > > > As promised here are some fixes for the cc2420 driver. > > > > [PATCH 1/4] ieee802154/cc2420: Check for FCS bit and skip frames > > > > I don't think it makes sense to push any frmaes in

Re: [Linux-zigbee-devel] CC2420 driver fixes

2011-06-24 Thread Dmitry Eremin-Solenikov
On 6/18/11, Stefan Schmidt wrote: > Hello. > > As promised here are some fixes for the cc2420 driver. > > [PATCH 1/4] ieee802154/cc2420: Check for FCS bit and skip frames > > I don't think it makes sense to push any frmaes into the stack that have a > known > failed CRC check. > > [PATCH 2/4] ieee

Re: [Linux-zigbee-devel] [PATCH 2/2] at86rf230: initialize unused buffers in struct spi_transfer to NULL

2011-06-24 Thread Dmitry Eremin-Solenikov
Hello, On 6/24/11, Werner Almesberger wrote: > In unidirectional SPI transfer structures, only tx_buf or rx_buf > was initialized, leaving the other buffer undefined. This patch > initializes the unused buffer pointers to NULL. Are you sure about this? Becasue IIRC the C standard, in partial str