Commit 8ade3ef
Al Stone
can: can327: can327_feed_frame_to_netdev(): fix potential skb leak when netdev is down
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2071839
Tested: This is one of a series of patch sets to enable Arm SystemReady IR
support. This set updates the CAN driver subsystem. This set has
been tested on NXP imx8mm and NV Jetson Xavier NX via simple boot
tests, using cansend/candump from can-utils to pass messages through
a virtual CAN interface, and of course the CI loop.
commit 8fa452c
Author: Ziyang Xuan <william.xuanziyang@huawei.com>
Date: Thu Nov 10 14:14:37 2022 +0800
can: can327: can327_feed_frame_to_netdev(): fix potential skb leak when netdev is down
In can327_feed_frame_to_netdev(), it did not free the skb when netdev
is down, and all callers of can327_feed_frame_to_netdev() did not free
allocated skb too. That would trigger skb leak.
Fix it by adding kfree_skb() in can327_feed_frame_to_netdev() when netdev
is down. Not tested, just compiled.
Fixes: 43da2f0 ("can: can327: CAN/ldisc driver for ELM327 based OBD-II adapters")
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
Link: https://lore.kernel.org/all/20221110061437.411525-1-william.xuanziyang@huawei.com
Reviewed-by: Max Staudt <max@enpas.org>
Cc: stable@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
(cherry picked from commit 8fa452c)
Signed-off-by: Al Stone <ahs3@redhat.com>1 parent daf9f48 commit 8ade3ef
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
| 267 | + | |
267 | 268 | | |
| 269 | + | |
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
| |||
0 commit comments