Skip to content

Commit a48fc43

Browse files
pvts-matPlaidCat
authored andcommitted
can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in error path
jira VULN-3163 cve CVE-2022-28390 commit-author Hangyu Hua <[email protected]> commit c702227 There is no need to call dev_kfree_skb() when usb_submit_urb() fails beacause can_put_echo_skb() deletes the original skb and can_free_echo_skb() deletes the cloned skb. Link: https://lore.kernel.org/all/[email protected] Fixes: 702171a ("ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface") Cc: [email protected] Cc: Sebastian Haas <[email protected]> Signed-off-by: Hangyu Hua <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> (cherry picked from commit c702227) Signed-off-by: Marcin Wcisło <[email protected]>
1 parent 175b4d8 commit a48fc43

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/net/can/usb/ems_usb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,6 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne
811811

812812
usb_unanchor_urb(urb);
813813
usb_free_coherent(dev->udev, size, buf, urb->transfer_dma);
814-
dev_kfree_skb(skb);
815814

816815
atomic_dec(&dev->active_tx_urbs);
817816

0 commit comments

Comments
 (0)