Commit b206d6d
committed
vsock/virtio: Validate length in packet header before skb_put()
jira VULN-136554
cve CVE-2025-39718
commit-author Will Deacon <will@kernel.org>
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: <stable@vger.kernel.org>
Fixes: 71dc9ec ("virtio/vsock: replace virtio_vsock_pkt with sk_buff")
Signed-off-by: Will Deacon <will@kernel.org>
Message-Id: <20250717090116.11987-3-will@kernel.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
(cherry picked from commit 0dab924)
Signed-off-by: Shreeya Patel <spatel@ciq.com>1 parent 0eb801e commit b206d6d
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