Commit 99d4eab
Mete Durlu
net/smc: check v2_ext_offset/eid_cnt/ism_gid_cnt when receiving proposal msg
JIRA: https://issues.redhat.com/browse/RHEL-73484
CVE: CVE-2024-57791
commit 7863c9f
Author: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Date: Wed Dec 11 17:21:19 2024 +0800
net/smc: check v2_ext_offset/eid_cnt/ism_gid_cnt when receiving proposal msg
When receiving proposal msg in server, the fields v2_ext_offset/
eid_cnt/ism_gid_cnt in proposal msg are from the remote client
and can not be fully trusted. Especially the field v2_ext_offset,
once exceed the max value, there has the chance to access wrong
address, and crash may happen.
This patch checks the fields v2_ext_offset/eid_cnt/ism_gid_cnt
before using them.
Fixes: 8c3dca3 ("net/smc: build and send V2 CLC proposal")
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 4836339 commit 99d4eab
3 files changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2266 | 2266 | | |
2267 | 2267 | | |
2268 | 2268 | | |
2269 | | - | |
| 2269 | + | |
| 2270 | + | |
2270 | 2271 | | |
2271 | 2272 | | |
2272 | 2273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | 355 | | |
357 | 356 | | |
358 | 357 | | |
| |||
369 | 368 | | |
370 | 369 | | |
371 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
372 | 378 | | |
373 | 379 | | |
374 | 380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
379 | 380 | | |
380 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
381 | 387 | | |
382 | 388 | | |
383 | 389 | | |
| |||
0 commit comments