{"id":"CVE-2021-47604","state":"PUBLISHED","title":"vduse: check that offset is within bounds in get_config()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nvduse: check that offset is within bounds in get_config()\n\nThis condition checks \"len\" but it does not check \"offset\" and that\ncould result in an out of bounds read if \"offset > dev->config_size\".\nThe problem is that since both variables are unsigned the\n\"dev->config_size - offset\" subtraction would result in a very high\nunsigned value.\n\nI think these checks might not be necessary because \"len\" and \"offset\"\nare supposed to already have been validated using the\nvhost_vdpa_config_validate() function.  But I do not know the code\nperfectly, and I like to be safe.","publishedAt":"2024-06-19T14:54:03.664Z","updatedAt":"2026-08-05T08:48:33.959Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c8a6153b6c59d95c0e091f053f6f180952ade91e","status":"affected","lessThan":"ebbbc5fea3f648175df1aa3f127c78eb0252cc2a","versionType":"git"},{"version":"c8a6153b6c59d95c0e091f053f6f180952ade91e","status":"affected","lessThan":"dc1db0060c02d119fd4196924eff2d1129e9a442","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/vdpa/vdpa_user/vduse_dev.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.11","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/vdpa/vdpa_user/vduse_dev.c"]}],"references":["https://git.kernel.org/stable/c/ebbbc5fea3f648175df1aa3f127c78eb0252cc2a","https://git.kernel.org/stable/c/dc1db0060c02d119fd4196924eff2d1129e9a442"],"weaknesses":[],"ingestedAt":"2026-10-29T19:49:19.404Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/47xxx/CVE-2021-47604.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-47604","state":"PUBLISHED","datePublished":"2024-06-19T14:54:03.664Z","dateUpdated":"2026-08-05T08:48:33.959Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-24T15:11:00.736Z"},"containers":{"cna":{"title":"vduse: check that offset is within bounds in get_config()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nvduse: check that offset is within bounds in get_config()\n\nThis condition checks \"len\" but it does not check \"offset\" and that\ncould result in an out of bounds read if \"offset > dev->config_size\".\nThe problem is that since both variables are unsigned the\n\"dev->config_size - offset\" subtraction would result in a very high\nunsigned value.\n\nI think these checks might not be necessary because \"len\" and \"offset\"\nare supposed to already have been validated using the\nvhost_vdpa_config_validate() function.  But I do not know the code\nperfectly, and I like to be safe."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c8a6153b6c59d95c0e091f053f6f180952ade91e","status":"affected","lessThan":"ebbbc5fea3f648175df1aa3f127c78eb0252cc2a","versionType":"git"},{"version":"c8a6153b6c59d95c0e091f053f6f180952ade91e","status":"affected","lessThan":"dc1db0060c02d119fd4196924eff2d1129e9a442","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/vdpa/vdpa_user/vduse_dev.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.11","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/vdpa/vdpa_user/vduse_dev.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/ebbbc5fea3f648175df1aa3f127c78eb0252cc2a"},{"url":"https://git.kernel.org/stable/c/dc1db0060c02d119fd4196924eff2d1129e9a442"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable get_config path is reached through local interfaces (vhost-vdpa ioctl VHOST_VDPA_GET_CONFIG or virtio-vdpa config reads after attaching a VDUSE device), not via network packets.\nAC:L - The attacker fully controls offset and length through the ioctl (or by creating a VDUSE device with a small config_size and feature bits that cause larger-offset reads); no race or other condition beyond attacker control is required.\nPR:L - Exploitation requires access to vhost-vdpa/VDUSE device nodes that are commonly granted to non-root virtualization users (e.g., qemu/kvm group), not capabilities that are only available to real root in the init user namespace.\nUI:N - No victim interaction is needed; the attacker triggers the OOB read directly via ioctl or by attaching/probing the malicious VDUSE device.\nS:U - Impact is confined to the host kernel and the calling process (kernel memory disclosure or oops); this does not cross a VM/IOMMU/sandbox security authority boundary by itself.\nC:H - The underflow allows an unbounded out-of-bounds read from kernel memory past the config buffer, and on the vhost-vdpa path that data is copied to userspace via copy_to_user, enabling arbitrary kernel memory disclosure.\nI:N - The bug is a pure out-of-bounds read (memcpy from config+offset into a destination buffer) with no write primitive or integrity modification of kernel state.\nA:H - A sufficiently large or far OOB read can access unmapped memory and cause a kernel oops/panic, resulting in a full denial of service."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:48:33.959Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.15.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/ebbbc5fea3f648175df1aa3f127c78eb0252cc2a","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/dc1db0060c02d119fd4196924eff2d1129e9a442","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T05:47:40.211Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2021-47604","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T17:12:14.372380Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:34:51.680Z"}}]}}}