netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] Fix vlan tag handling for vlan packets without ethernet headers
@ 2018-03-29 10:05 Toshiaki Makita
  2018-03-29 10:05 ` [PATCH net 1/2] net: Fix untag for vlan packets without ethernet header Toshiaki Makita
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Toshiaki Makita @ 2018-03-29 10:05 UTC (permalink / raw)
  To: David S. Miller; +Cc: Toshiaki Makita, netdev, Eric Dumazet

Eric Dumazet reported syzbot found a new bug which leads to underflow of
size argument of memmove(), causing crash[1]. This can be triggered by tun
devices.

The underflow happened because skb_vlan_untag() did not expect vlan packets
without ethernet headers, and tun can produce such packets.
I also checked vlan_insert_inner_tag() and found a similar bug.

This series fixes these problems.

[1] https://marc.info/?l=linux-netdev&m=152221753920510&w=2

Toshiaki Makita (2):
  net: Fix untag for vlan packets without ethernet header
  vlan: Fix vlan insertion for packets without ethernet header

 include/linux/if_vlan.h | 15 +++++++++++++--
 net/core/skbuff.c       |  6 ++++--
 2 files changed, 17 insertions(+), 4 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-30 16:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-29 10:05 [PATCH net 0/2] Fix vlan tag handling for vlan packets without ethernet headers Toshiaki Makita
2018-03-29 10:05 ` [PATCH net 1/2] net: Fix untag for vlan packets without ethernet header Toshiaki Makita
2018-03-29 10:05 ` [PATCH net 2/2] vlan: Fix vlan insertion for " Toshiaki Makita
2018-03-30 16:49 ` [PATCH net 0/2] Fix vlan tag handling for vlan packets without ethernet headers David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).