Commit 80ae145
committed
vsock/virtio: Validate length in packet header before skb_put()
jira VULN-136554
cve CVE-2025-39718
commit-author Will Deacon <[email protected]>
commit 0dab924
When receiving a vsock packet in the guest, only the virtqueue buffer
size is validated prior to virtio_vsock_skb_rx_put(). Unfortunately,
virtio_vsock_skb_rx_put() uses the length from the packet header as the
length argument to skb_put(), potentially resulting in SKB overflow if
the host has gone wonky.
Validate the length as advertised by the packet header before calling
virtio_vsock_skb_rx_put().
Cc: <[email protected]>
Fixes: 71dc9ec ("virtio/vsock: replace virtio_vsock_pkt with sk_buff")
Signed-off-by: Will Deacon <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Stefano Garzarella <[email protected]>
(cherry picked from commit 0dab924)
Signed-off-by: Shreeya Patel <[email protected]>1 parent 2be2dbb commit 80ae145
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| 584 | + | |
| 585 | + | |
584 | 586 | | |
585 | | - | |
586 | 587 | | |
587 | 588 | | |
588 | 589 | | |
| |||
599 | 600 | | |
600 | 601 | | |
601 | 602 | | |
602 | | - | |
| 603 | + | |
603 | 604 | | |
604 | 605 | | |
605 | 606 | | |
606 | 607 | | |
607 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
608 | 616 | | |
609 | 617 | | |
610 | 618 | | |
| |||
0 commit comments