Or Cohen
acf69c9462
net/packet: fix overflow in tpacket_rcv
...
Using tp_reserve to calculate netoff can overflow as
tp_reserve is unsigned int and netoff is unsigned short.
This may lead to macoff receving a smaller value then
sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr
is set, an out-of-bounds write will occur when
calling virtio_net_hdr_from_skb.
The bug is fixed by converting netoff to unsigned int
and checking if it exceeds USHRT_MAX.
This addresses CVE-2020-14386
Fixes: 8913336a7e ("packet: add PACKET_RESERVE sockopt")
Signed-off-by: Or Cohen <orcohen@paloaltonetworks.com >
Signed-off-by: Eric Dumazet <edumazet@google.com >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2020-09-04 11:56:02 -07:00
..
2020-06-14 01:57:21 +09:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-03 15:48:32 -07:00
2020-08-23 17:36:59 -05:00
2020-07-25 17:49:04 -07:00
2020-08-18 19:40:03 +02:00
2020-08-07 11:33:22 -07:00
2020-08-23 17:36:59 -05:00
2020-08-04 14:27:25 -07:00
2020-08-14 11:59:08 +02:00
2020-08-25 07:50:25 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-09-03 18:50:48 -07:00
2020-06-23 20:27:09 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-04-28 14:39:46 -07:00
2020-08-23 17:36:59 -05:00
2020-05-23 16:56:17 -07:00
2020-08-18 16:00:24 -07:00
2020-07-31 16:46:26 -07:00
2020-08-23 17:36:59 -05:00
2020-08-28 20:11:38 +02:00
2020-09-02 15:44:53 -07:00
2020-08-23 17:36:59 -05:00
2020-07-24 15:41:54 -07:00
2020-08-02 01:02:12 -07:00
2020-07-30 16:45:31 -07:00
2020-08-27 07:55:59 -07:00
2020-06-14 01:57:21 +09:00
2020-07-24 15:41:54 -07:00
2020-08-27 10:53:20 +02:00
2020-08-07 11:33:22 -07:00
2020-08-23 17:36:59 -05:00
2020-09-03 18:50:48 -07:00
2020-08-23 17:36:59 -05:00
2020-09-03 18:50:48 -07:00
2020-08-24 16:08:00 -07:00
2020-09-03 18:50:48 -07:00
2020-08-23 17:36:59 -05:00
2020-08-11 10:34:30 -07:00
2020-06-14 01:57:21 +09:00
2020-08-23 17:36:59 -05:00
2020-09-04 11:56:02 -07:00
2020-08-23 17:36:59 -05:00
2020-05-23 16:36:05 -07:00
2020-08-17 15:00:41 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-09-03 18:50:48 -07:00
2020-09-03 18:50:48 -07:00
2020-09-03 18:50:48 -07:00
2020-09-03 18:50:48 -07:00
2020-08-25 18:01:36 -07:00
2020-07-13 17:20:40 -07:00
2020-09-03 18:50:48 -07:00
2020-08-11 10:20:34 -07:00
2020-08-23 17:36:59 -05:00
2020-08-12 12:56:06 -07:00
2020-09-03 18:50:48 -07:00
2020-08-23 17:36:59 -05:00
2020-07-28 12:50:15 +02:00
2020-08-23 17:36:59 -05:00
2020-08-07 12:43:25 -07:00
2020-06-30 15:57:34 -07:00
2020-07-07 15:41:05 -07:00
2020-05-23 16:56:17 -07:00
2020-08-27 07:55:59 -07:00