Commit 9460e79
sctp: avoid NULL dereference when chunk data buffer is missing
jira VULN-176137
cve CVE-2025-40240
commit-author Alexey Simakov <bigalex934@gmail.com>
commit 441f064
upstream-diff Same change as in upstream, except for ciqcbr7_9's
SCTP_INC_STATS_BH macro instead of upstream's __SCTP_INC_STATS. It's
the same macro, renamed on upstream in
13415e4 ("net: snmp: kill STATS_BH
macros")
chunk->skb pointer is dereferenced in the if-block where it's supposed
to be NULL only.
chunk->skb can only be NULL if chunk->head_skb is not. Check for frag_list
instead and do it just before replacing chunk->skb. We're sure that
otherwise chunk->skb is non-NULL because of outer if() condition.
Fixes: 90017ac ("sctp: Add GSO support")
Signed-off-by: Alexey Simakov <bigalex934@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Link: https://patch.msgid.link/20251021130034.6333-1-bigalex934@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 441f064)
Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>1 parent 66fc3f0 commit 9460e79
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
189 | 195 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
| |||
0 commit comments