diff options
| author | Alexander Drozdov <al.drozdov@gmail.com> | 2015-07-28 13:57:01 +0300 |
|---|---|---|
| committer | Luis Henriques <luis.henriques@canonical.com> | 2015-08-25 10:13:53 +0100 |
| commit | 581823ecc47b2e0c164eccf3bf171a0c6097abd9 (patch) | |
| tree | 44f20635a4d034cdbde514e949ba57d601547f38 /include/uapi/linux/kernel.h | |
| parent | 26b1c3fa5972853b98c97fe6065a73e0096c2024 (diff) | |
packet: tpacket_snd(): fix signed/unsigned comparison
commit dbd46ab412b8fb395f2b0ff6f6a7eec9df311550 upstream.
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.
Fixes: 52f1454f629fa ("packet: allow to transmit +4 byte in TX_RING slot for VLAN case")
Signed-off-by: Alexander Drozdov <al.drozdov@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'include/uapi/linux/kernel.h')
0 files changed, 0 insertions, 0 deletions
