Commit e8a3beb
CKI KWF Bot
Merge: vsock/virtio: Validate length in packet header before skb_put()
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7459
vsock/virtio: Validate length in packet header before skb_put()
JIRA: https://issues.redhat.com/browse/RHEL-114300
CVE: CVE-2025-39718
commit 0dab924
Author: Will Deacon <will@kernel.org>
Date: Thu Jul 17 10:01:09 2025 +0100
sock/virtio: Validate length in packet header before skb_put()
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>
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
Approved-by: Stefano Garzarella <sgarzare@redhat.com>
Approved-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Approved-by: Stefan Hajnoczi <stefanha@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>
Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
| 585 | + | |
| 586 | + | |
585 | 587 | | |
586 | | - | |
587 | 588 | | |
588 | 589 | | |
589 | 590 | | |
| |||
600 | 601 | | |
601 | 602 | | |
602 | 603 | | |
603 | | - | |
| 604 | + | |
604 | 605 | | |
605 | 606 | | |
606 | 607 | | |
607 | 608 | | |
608 | 609 | | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
609 | 617 | | |
610 | 618 | | |
611 | 619 | | |
| |||
0 commit comments