vsock/virtio: fix MSG_ZEROCOPY pinned-pages accounting
In the Linux kernel, the following vulnerability has been resolved: vsock/virtio: fix MSG_ZEROCOPY pinned-pages accounting virtio_transport_init_zcopy_skb() uses iter->count as the size argument for msg_zerocopy_realloc(), which in turn passes it to mm_account_pinned_pages() for RLIMIT_MEMLOCK accounting. However, this function is called after virtio_transport_fill_skb() has already consumed the iterator via __zerocopy_sg_from_iter(), so on the last skb, iter->count will be 0, skipping the RLIMIT_MEMLOCK enforcement. Pass pkt_len (the total bytes being sent) as an explicit parameter to virtio_transport_init_zcopy_skb() instead of reading the already-consumed iter->count. This matches TCP and UDP, which both call msg_zerocopy_realloc() with the original message size.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.18.33, 7.0.10
- CVEs
- CVE-2026-52994
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 01:58 UTC · Revision 1
Source evidence
vsock/virtio: fix MSG_ZEROCOPY pinned-pages accounting
core-osv · Original sourcePublished 24 Jun 2026, 16:29 UTC
In the Linux kernel, the following vulnerability has been resolved: vsock/virtio: fix MSG_ZEROCOPY pinned-pages accounting virtio_transport_init_zcopy_skb() uses iter->count as the size argument for msg_zerocopy_realloc(), which in turn passes it to mm_account_pinned_pages() for RLIMIT_MEMLOCK accounting. However, this function is called after virtio_transport_fill_skb() has already consumed the iterator via __zerocopy_sg_from_iter(), so on the last skb, iter->count will be 0, skipping the RLIMIT_MEMLOCK enforcement. Pass pkt_len (the total bytes being sent) as an explicit parameter to virtio_transport_init_zcopy_skb() instead of reading the already-consumed iter->count. This matches TCP and UDP, which both call msg_zerocopy_realloc() with the original message size.
osv:CVE-2026-52994
Kernel
Fixed versions: 6.18.33, 7.0.10
Complete source record
{
"id": "c3b6ef98a11eba01432729cab3d0e3c361a4e1728ff8e3e9c59be7865b6de130",
"url": "https://osv.dev/vulnerability/CVE-2026-52994",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "vsock/virtio: fix MSG_ZEROCOPY pinned-pages accounting",
"summary": "In the Linux kernel, the following vulnerability has been resolved: vsock/virtio: fix MSG_ZEROCOPY pinned-pages accounting virtio_transport_init_zcopy_skb() uses iter->count as the size argument for msg_zerocopy_realloc(), which in turn passes it to mm_account_pinned_pages() for RLIMIT_MEMLOCK accounting. However, this function is called after virtio_transport_fill_skb() has already consumed the iterator via __zerocopy_sg_from_iter(), so on the last skb, iter->count will be 0, skipping the RLIMIT_MEMLOCK enforcement. Pass pkt_len (the total bytes being sent) as an explicit parameter to virtio_transport_init_zcopy_skb() instead of reading the already-consumed iter->count. This matches TCP and UDP, which both call msg_zerocopy_realloc() with the original message size.",
"evidence": "osv:CVE-2026-52994",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.18.33",
"evidence": "/affected/1/ranges"
},
{
"value": "7.0.10",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-52994",
"aliases": [
"CVE-2026-52994"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "581512a6dc939ef122e49336626ae159f3b8a345"
},
{
"fixed": "6af1736b5810bc8a4a43a8518530113f5a757dc1"
},
{
"fixed": "d0117950075f0a9d5944980784c719d8ebcd4bff"
},
{
"fixed": "1cb36e252211506f51095fe7ced8286cc77b4c80"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-52994.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.18.33"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.19.0"
},
{
"fixed": "7.0.10"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-52994.json"
}
}
],
"modified": "2026-10-28T02:30:42.011315013Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/1cb36e252211506f51095fe7ced8286cc77b4c80",
"https://git.kernel.org/stable/c/6af1736b5810bc8a4a43a8518530113f5a757dc1",
"https://git.kernel.org/stable/c/d0117950075f0a9d5944980784c719d8ebcd4bff",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/52xxx/CVE-2026-52994.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-52994",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/52xxx/CVE-2026-52994.json"
}
},
"related_cves": [
{
"value": "CVE-2026-52994",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 509285,
"published_at": "2026-06-24T16:29:07.36+00:00"
}