Commit 5c3398a
net: ncsi: fix skb leak in error paths
Early return paths in NCSI RX and AEN handlers fail to release
the received skb, resulting in a memory leak.
Specifically, ncsi_aen_handler() returns on invalid AEN packets
without consuming the skb. Similarly, ncsi_rcv_rsp() exits early
when failing to resolve the NCSI device, response handler, or
request, leaving the skb unfreed.
CC: [email protected]
Fixes: 7a82ecf ("net/ncsi: NCSI AEN packet handler")
Fixes: 138635c ("net/ncsi: NCSI response packet handler")
Signed-off-by: Jian Zhang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 63f428c commit 5c3398a
2 files changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
| 228 | + | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
1179 | | - | |
1180 | | - | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
1181 | 1183 | | |
1182 | 1184 | | |
1183 | 1185 | | |
| |||
1199 | 1201 | | |
1200 | 1202 | | |
1201 | 1203 | | |
1202 | | - | |
| 1204 | + | |
| 1205 | + | |
1203 | 1206 | | |
1204 | 1207 | | |
1205 | 1208 | | |
1206 | 1209 | | |
1207 | 1210 | | |
1208 | 1211 | | |
1209 | 1212 | | |
1210 | | - | |
| 1213 | + | |
| 1214 | + | |
1211 | 1215 | | |
1212 | 1216 | | |
1213 | 1217 | | |
| |||
1261 | 1265 | | |
1262 | 1266 | | |
1263 | 1267 | | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
1264 | 1272 | | |
0 commit comments