Commit 14a08a6
committed
vsock: Fix transport_* TOCTOU
jira VULN-80685
cve CVE-2025-38461
commit-author Michal Luczaj <mhal@rbox.co>
commit 687aa0c
Transport assignment may race with module unload. Protect new_transport
from becoming a stale pointer.
This also takes care of an insecure call in vsock_use_local_transport();
add a lockdep assert.
BUG: unable to handle page fault for address: fffffbfff8056000
Oops: Oops: 0000 [#1] SMP KASAN
RIP: 0010:vsock_assign_transport+0x366/0x600
Call Trace:
vsock_connect+0x59c/0xc40
__sys_connect+0xe8/0x100
__x64_sys_connect+0x6e/0xc0
do_syscall_64+0x92/0x1c0
entry_SYSCALL_64_after_hwframe+0x4b/0x53
Fixes: c0cfa2d ("vsock: add multi-transports support")
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
Link: https://patch.msgid.link/20250703-vsock-transports-toctou-v4-2-98f0eb530747@rbox.co
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 687aa0c)
Signed-off-by: Shreeya Patel <spatel@ciq.com>1 parent 991dbb2 commit 14a08a6
1 file changed
+23
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
| 408 | + | |
407 | 409 | | |
408 | 410 | | |
409 | 411 | | |
| |||
461 | 463 | | |
462 | 464 | | |
463 | 465 | | |
| 466 | + | |
| 467 | + | |
464 | 468 | | |
465 | 469 | | |
466 | 470 | | |
| |||
476 | 480 | | |
477 | 481 | | |
478 | 482 | | |
479 | | - | |
| 483 | + | |
| 484 | + | |
480 | 485 | | |
481 | 486 | | |
482 | 487 | | |
483 | | - | |
484 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
485 | 492 | | |
486 | 493 | | |
487 | 494 | | |
| |||
496 | 503 | | |
497 | 504 | | |
498 | 505 | | |
499 | | - | |
500 | | - | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
501 | 516 | | |
502 | 517 | | |
503 | 518 | | |
| |||
516 | 531 | | |
517 | 532 | | |
518 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
519 | 537 | | |
520 | 538 | | |
521 | 539 | | |
| |||
0 commit comments