{"id":"CVE-2026-52994","state":"PUBLISHED","title":"vsock/virtio: fix MSG_ZEROCOPY pinned-pages accounting","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nvsock/virtio: fix MSG_ZEROCOPY pinned-pages accounting\n\nvirtio_transport_init_zcopy_skb() uses iter->count as the size argument\nfor msg_zerocopy_realloc(), which in turn passes it to\nmm_account_pinned_pages() for RLIMIT_MEMLOCK accounting. However, this\nfunction is called after virtio_transport_fill_skb() has already consumed\nthe iterator via __zerocopy_sg_from_iter(), so on the last skb, iter->count\nwill be 0, skipping the RLIMIT_MEMLOCK enforcement.\n\nPass pkt_len (the total bytes being sent) as an explicit parameter to\nvirtio_transport_init_zcopy_skb() instead of reading the already-consumed\niter->count.\n\nThis matches TCP and UDP, which both call msg_zerocopy_realloc() with\nthe original message size.","publishedAt":"2026-06-24T16:29:07.360Z","updatedAt":"2026-06-24T16:29:07.360Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"581512a6dc939ef122e49336626ae159f3b8a345","status":"affected","lessThan":"6af1736b5810bc8a4a43a8518530113f5a757dc1","versionType":"git"},{"version":"581512a6dc939ef122e49336626ae159f3b8a345","status":"affected","lessThan":"d0117950075f0a9d5944980784c719d8ebcd4bff","versionType":"git"},{"version":"581512a6dc939ef122e49336626ae159f3b8a345","status":"affected","lessThan":"1cb36e252211506f51095fe7ced8286cc77b4c80","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/vmw_vsock/virtio_transport_common.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.7","versionType":"semver"},{"version":"6.18.33","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.10","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/vmw_vsock/virtio_transport_common.c"]}],"references":["https://git.kernel.org/stable/c/6af1736b5810bc8a4a43a8518530113f5a757dc1","https://git.kernel.org/stable/c/d0117950075f0a9d5944980784c719d8ebcd4bff","https://git.kernel.org/stable/c/1cb36e252211506f51095fe7ced8286cc77b4c80"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:16.098Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/52xxx/CVE-2026-52994.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-52994","state":"PUBLISHED","datePublished":"2026-06-24T16:29:07.360Z","dateUpdated":"2026-06-24T16:29:07.360Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-06-09T07:44:35.377Z"},"containers":{"cna":{"title":"vsock/virtio: fix MSG_ZEROCOPY pinned-pages accounting","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nvsock/virtio: fix MSG_ZEROCOPY pinned-pages accounting\n\nvirtio_transport_init_zcopy_skb() uses iter->count as the size argument\nfor msg_zerocopy_realloc(), which in turn passes it to\nmm_account_pinned_pages() for RLIMIT_MEMLOCK accounting. However, this\nfunction is called after virtio_transport_fill_skb() has already consumed\nthe iterator via __zerocopy_sg_from_iter(), so on the last skb, iter->count\nwill be 0, skipping the RLIMIT_MEMLOCK enforcement.\n\nPass pkt_len (the total bytes being sent) as an explicit parameter to\nvirtio_transport_init_zcopy_skb() instead of reading the already-consumed\niter->count.\n\nThis matches TCP and UDP, which both call msg_zerocopy_realloc() with\nthe original message size."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"581512a6dc939ef122e49336626ae159f3b8a345","status":"affected","lessThan":"6af1736b5810bc8a4a43a8518530113f5a757dc1","versionType":"git"},{"version":"581512a6dc939ef122e49336626ae159f3b8a345","status":"affected","lessThan":"d0117950075f0a9d5944980784c719d8ebcd4bff","versionType":"git"},{"version":"581512a6dc939ef122e49336626ae159f3b8a345","status":"affected","lessThan":"1cb36e252211506f51095fe7ced8286cc77b4c80","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/vmw_vsock/virtio_transport_common.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.7","versionType":"semver"},{"version":"6.18.33","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.10","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/vmw_vsock/virtio_transport_common.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/6af1736b5810bc8a4a43a8518530113f5a757dc1"},{"url":"https://git.kernel.org/stable/c/d0117950075f0a9d5944980784c719d8ebcd4bff"},{"url":"https://git.kernel.org/stable/c/1cb36e252211506f51095fe7ced8286cc77b4c80"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-06-24T16:29:07.360Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.18.33"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"7.0.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"7.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}