Commit 64e3a83
committed
vsock: Fix transport_* TOCTOU
jira VULN-80682
jira VULN-80681
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: Jonathan Maple <jmaple@ciq.com>1 parent 51deadb commit 64e3a83
1 file changed
+23
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| 401 | + | |
| 402 | + | |
401 | 403 | | |
402 | 404 | | |
403 | 405 | | |
| |||
455 | 457 | | |
456 | 458 | | |
457 | 459 | | |
| 460 | + | |
| 461 | + | |
458 | 462 | | |
459 | 463 | | |
460 | 464 | | |
| |||
469 | 473 | | |
470 | 474 | | |
471 | 475 | | |
472 | | - | |
| 476 | + | |
| 477 | + | |
473 | 478 | | |
474 | 479 | | |
475 | 480 | | |
476 | | - | |
477 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
478 | 485 | | |
479 | 486 | | |
480 | 487 | | |
| |||
489 | 496 | | |
490 | 497 | | |
491 | 498 | | |
492 | | - | |
493 | | - | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
494 | 509 | | |
495 | 510 | | |
496 | 511 | | |
| |||
501 | 516 | | |
502 | 517 | | |
503 | 518 | | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
504 | 522 | | |
505 | 523 | | |
506 | 524 | | |
| |||
0 commit comments