2010-02-17 19:12:12

by Iain Hibbert

[permalink] [raw]
Subject: [PATCH] prevent buffer overruns when parsing invalid OBEX frames

Hi,

While I have git installed then, I found a problem recently where hcidump
would dump core when parsing an OBEX packet. It turned out that the OBEX
packet was faulty at my end (socket buffer exhausted), but the patch
attached prevents the parsing code from running off the end of the buffer
and receiving a SIGSEGV.

The patch does not make any complaint about the invalid frame, adding that
would be a little more complex and I'm not sure its necessary?

iain


Attachments:
0001-prevent-buffer-overruns-when-parsing-invalid-OBEX-fr.patch (2.42 kB)

2010-02-17 19:15:16

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] prevent buffer overruns when parsing invalid OBEX frames

Hi Iain,

> While I have git installed then, I found a problem recently where hcidump
> would dump core when parsing an OBEX packet. It turned out that the OBEX
> packet was faulty at my end (socket buffer exhausted), but the patch
> attached prevents the parsing code from running off the end of the buffer
> and receiving a SIGSEGV.
>
> The patch does not make any complaint about the invalid frame, adding that
> would be a little more complex and I'm not sure its necessary?

patch has been applied. Thanks.

Regards

Marcel