Commit 4836339
Mete Durlu
net/smc: check iparea_offset and ipv6_prefixes_cnt when receiving proposal msg
JIRA: https://issues.redhat.com/browse/RHEL-73484
CVE: CVE-2024-57791
commit a29e220
Author: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Date: Wed Dec 11 17:21:18 2024 +0800
net/smc: check iparea_offset and ipv6_prefixes_cnt when receiving proposal msg
When receiving proposal msg in server, the field iparea_offset
and the field ipv6_prefixes_cnt in proposal msg are from the
remote client and can not be fully trusted. Especially the
field iparea_offset, once exceed the max value, there has the
chance to access wrong address, and crash may happen.
This patch checks iparea_offset and ipv6_prefixes_cnt before using them.
Fixes: e7b7a64 ("smc: support variable CLC proposal messages")
Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Reviewed-by: Wen Gu <guwen@linux.alibaba.com>
Reviewed-by: D. Wythe <alibuda@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Mete Durlu <mdurlu@redhat.com>1 parent 1226e1a commit 4836339
3 files changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2022 | 2022 | | |
2023 | 2023 | | |
2024 | 2024 | | |
| 2025 | + | |
| 2026 | + | |
2025 | 2027 | | |
2026 | 2028 | | |
2027 | 2029 | | |
| |||
2211 | 2213 | | |
2212 | 2214 | | |
2213 | 2215 | | |
2214 | | - | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
2215 | 2219 | | |
2216 | 2220 | | |
2217 | 2221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
357 | 361 | | |
358 | 362 | | |
359 | 363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
335 | 339 | | |
336 | | - | |
| 340 | + | |
337 | 341 | | |
338 | 342 | | |
339 | 343 | | |
| |||
0 commit comments