Messages in this thread | | | Date | Tue, 28 Jul 2015 13:07:02 +0200 | From | Daniel Borkmann <> | Subject | Re: [PATCH] packet: tpacket_snd(): fix signed/unsigned comparison |
| |
On 07/28/2015 12:57 PM, Alexander Drozdov wrote: > tpacket_fill_skb() can return a negative value (-errno) which > is stored in tp_len variable. In that case the following > condition will be (but shouldn't be) true: > > tp_len > dev->mtu + dev->hard_header_len > > as dev->mtu and dev->hard_header_len are both unsigned. > > That may lead to just returning an incorrect EMSGSIZE errno > to the user. > > Signed-off-by: Alexander Drozdov <al.drozdov@gmail.com>
Looks good to me, thanks!
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
| |