Commit b18a829
vsock: Fix transport_* TOCTOU
JIRA: https://issues.redhat.com/browse/RHEL-106002
CVE: CVE-2025-38461
commit 687aa0c
Author: Michal Luczaj <mhal@rbox.co>
Date: Thu Jul 3 17:18:19 2025 +0200
vsock: Fix transport_* TOCTOU
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>
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
Signed-off-by: Jon Maloy <jmaloy@redhat.com>1 parent f197184 commit b18a829
1 file changed
+23
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
409 | 411 | | |
410 | 412 | | |
411 | 413 | | |
| |||
463 | 465 | | |
464 | 466 | | |
465 | 467 | | |
| 468 | + | |
| 469 | + | |
466 | 470 | | |
467 | 471 | | |
468 | 472 | | |
| |||
478 | 482 | | |
479 | 483 | | |
480 | 484 | | |
481 | | - | |
| 485 | + | |
| 486 | + | |
482 | 487 | | |
483 | 488 | | |
484 | 489 | | |
485 | | - | |
486 | | - | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
487 | 494 | | |
488 | 495 | | |
489 | 496 | | |
| |||
498 | 505 | | |
499 | 506 | | |
500 | 507 | | |
501 | | - | |
502 | | - | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
503 | 518 | | |
504 | 519 | | |
505 | 520 | | |
| |||
518 | 533 | | |
519 | 534 | | |
520 | 535 | | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
521 | 539 | | |
522 | 540 | | |
523 | 541 | | |
| |||
0 commit comments