]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: usb: lan78xx: fix possible skb leak
authorEric Dumazet <edumazet@google.com>
Tue, 7 Jan 2020 18:57:01 +0000 (10:57 -0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
commit7a4a9b8c0427037d92f0e29902cb50ef90c2d387
treea90cad7afced6ecc1388fd2912ccab570cd3face
parentcffafade1b22aa542a1e36da400729699eb505e5
net: usb: lan78xx: fix possible skb leak

BugLink: https://bugs.launchpad.net/bugs/1861929
[ Upstream commit 47240ba0cd09bb6fe6db9889582048324999dfa4 ]

If skb_linearize() fails, we need to free the skb.

TSO makes skb bigger, and this bug might be the reason
Raspberry Pi 3B+ users had to disable TSO.

Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: RENARD Pierre-Francois <pfrenard@gmail.com>
Cc: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Woojung Huh <woojung.huh@microchip.com>
Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/usb/lan78xx.c