{"id":"CVE-2024-50074","state":"PUBLISHED","title":"parport: Proper fix for array out-of-bounds access","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nparport: Proper fix for array out-of-bounds access\n\nThe recent fix for array out-of-bounds accesses replaced sprintf()\ncalls blindly with snprintf().  However, since snprintf() returns the\nwould-be-printed size, not the actually output size, the length\ncalculation can still go over the given limit.\n\nUse scnprintf() instead of snprintf(), which returns the actually\noutput letters, for addressing the potential out-of-bounds access\nproperly.","publishedAt":"2024-10-29T00:50:16.263Z","updatedAt":"2026-08-05T11:41:24.682Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"166a0bddcc27de41fe13f861c8348e8e53e988c8","status":"affected","lessThan":"8aadef73ba3b325704ed5cfc4696a25c350182cf","versionType":"git"},{"version":"47b3dce100778001cd76f7e9188944b5cb27a76d","status":"affected","lessThan":"b0641e53e6cb937487b6cfb15772374f0ba149b3","versionType":"git"},{"version":"a44f88f7576bc1916d8d6293f5c62fbe7cbe03e0","status":"affected","lessThan":"1826b6d69bbb7f9ae8711827facbb2ad7f8d0aaa","versionType":"git"},{"version":"c719b393374d3763e64900ee19aaed767d5a08d6","status":"affected","lessThan":"440311903231c6e6c9bcf8acb6a2885a422e00bc","versionType":"git"},{"version":"7f4da759092a1a6ce35fb085182d02de8cc4cc84","status":"affected","lessThan":"fca048f222ce9dcbde5708ba2bf81d85a4a27952","versionType":"git"},{"version":"b579ea3516c371ecf59d073772bc45dfd28c8a0e","status":"affected","lessThan":"66029078fee00646e2e9dbb8f41ff7819f8e7569","versionType":"git"},{"version":"ab11dac93d2d568d151b1918d7b84c2d02bacbd5","status":"affected","lessThan":"2a8b26a09c8e3ea03da1ef3cd0ef6b96e559fba6","versionType":"git"},{"version":"ab11dac93d2d568d151b1918d7b84c2d02bacbd5","status":"affected","lessThan":"02ac3a9ef3a18b58d8f3ea2b6e46de657bf6c4f9","versionType":"git"},{"version":"7789a1d6792af410aa9b39a1eb237ed24fa2170a","status":"affected","versionType":"git"},{"version":"4.19.320","status":"affected","lessThan":"4.19.323","versionType":"semver"},{"version":"5.4.282","status":"affected","lessThan":"5.4.285","versionType":"semver"},{"version":"5.10.224","status":"affected","lessThan":"5.10.228","versionType":"semver"},{"version":"5.15.165","status":"affected","lessThan":"5.15.169","versionType":"semver"},{"version":"6.1.103","status":"affected","lessThan":"6.1.114","versionType":"semver"},{"version":"6.6.44","status":"affected","lessThan":"6.6.58","versionType":"semver"},{"version":"6.10.3","status":"affected","lessThan":"6.11","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/parport/procfs.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"4.19.323","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.285","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.228","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.169","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.114","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.58","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.5","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/parport/procfs.c"]}],"references":["https://git.kernel.org/stable/c/8aadef73ba3b325704ed5cfc4696a25c350182cf","https://git.kernel.org/stable/c/b0641e53e6cb937487b6cfb15772374f0ba149b3","https://git.kernel.org/stable/c/1826b6d69bbb7f9ae8711827facbb2ad7f8d0aaa","https://git.kernel.org/stable/c/440311903231c6e6c9bcf8acb6a2885a422e00bc","https://git.kernel.org/stable/c/fca048f222ce9dcbde5708ba2bf81d85a4a27952","https://git.kernel.org/stable/c/66029078fee00646e2e9dbb8f41ff7819f8e7569","https://git.kernel.org/stable/c/2a8b26a09c8e3ea03da1ef3cd0ef6b96e559fba6","https://git.kernel.org/stable/c/02ac3a9ef3a18b58d8f3ea2b6e46de657bf6c4f9","https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html","https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/50xxx/CVE-2024-50074.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-50074","state":"PUBLISHED","datePublished":"2024-10-29T00:50:16.263Z","dateUpdated":"2026-08-05T11:41:24.682Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-10-21T19:36:19.940Z"},"containers":{"cna":{"title":"parport: Proper fix for array out-of-bounds access","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nparport: Proper fix for array out-of-bounds access\n\nThe recent fix for array out-of-bounds accesses replaced sprintf()\ncalls blindly with snprintf().  However, since snprintf() returns the\nwould-be-printed size, not the actually output size, the length\ncalculation can still go over the given limit.\n\nUse scnprintf() instead of snprintf(), which returns the actually\noutput letters, for addressing the potential out-of-bounds access\nproperly."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"166a0bddcc27de41fe13f861c8348e8e53e988c8","status":"affected","lessThan":"8aadef73ba3b325704ed5cfc4696a25c350182cf","versionType":"git"},{"version":"47b3dce100778001cd76f7e9188944b5cb27a76d","status":"affected","lessThan":"b0641e53e6cb937487b6cfb15772374f0ba149b3","versionType":"git"},{"version":"a44f88f7576bc1916d8d6293f5c62fbe7cbe03e0","status":"affected","lessThan":"1826b6d69bbb7f9ae8711827facbb2ad7f8d0aaa","versionType":"git"},{"version":"c719b393374d3763e64900ee19aaed767d5a08d6","status":"affected","lessThan":"440311903231c6e6c9bcf8acb6a2885a422e00bc","versionType":"git"},{"version":"7f4da759092a1a6ce35fb085182d02de8cc4cc84","status":"affected","lessThan":"fca048f222ce9dcbde5708ba2bf81d85a4a27952","versionType":"git"},{"version":"b579ea3516c371ecf59d073772bc45dfd28c8a0e","status":"affected","lessThan":"66029078fee00646e2e9dbb8f41ff7819f8e7569","versionType":"git"},{"version":"ab11dac93d2d568d151b1918d7b84c2d02bacbd5","status":"affected","lessThan":"2a8b26a09c8e3ea03da1ef3cd0ef6b96e559fba6","versionType":"git"},{"version":"ab11dac93d2d568d151b1918d7b84c2d02bacbd5","status":"affected","lessThan":"02ac3a9ef3a18b58d8f3ea2b6e46de657bf6c4f9","versionType":"git"},{"version":"7789a1d6792af410aa9b39a1eb237ed24fa2170a","status":"affected","versionType":"git"},{"version":"4.19.320","status":"affected","lessThan":"4.19.323","versionType":"semver"},{"version":"5.4.282","status":"affected","lessThan":"5.4.285","versionType":"semver"},{"version":"5.10.224","status":"affected","lessThan":"5.10.228","versionType":"semver"},{"version":"5.15.165","status":"affected","lessThan":"5.15.169","versionType":"semver"},{"version":"6.1.103","status":"affected","lessThan":"6.1.114","versionType":"semver"},{"version":"6.6.44","status":"affected","lessThan":"6.6.58","versionType":"semver"},{"version":"6.10.3","status":"affected","lessThan":"6.11","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/parport/procfs.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"4.19.323","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.285","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.228","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.169","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.114","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.58","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.5","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/parport/procfs.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/8aadef73ba3b325704ed5cfc4696a25c350182cf"},{"url":"https://git.kernel.org/stable/c/b0641e53e6cb937487b6cfb15772374f0ba149b3"},{"url":"https://git.kernel.org/stable/c/1826b6d69bbb7f9ae8711827facbb2ad7f8d0aaa"},{"url":"https://git.kernel.org/stable/c/440311903231c6e6c9bcf8acb6a2885a422e00bc"},{"url":"https://git.kernel.org/stable/c/fca048f222ce9dcbde5708ba2bf81d85a4a27952"},{"url":"https://git.kernel.org/stable/c/66029078fee00646e2e9dbb8f41ff7819f8e7569"},{"url":"https://git.kernel.org/stable/c/2a8b26a09c8e3ea03da1ef3cd0ef6b96e559fba6"},{"url":"https://git.kernel.org/stable/c/02ac3a9ef3a18b58d8f3ea2b6e46de657bf6c4f9"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is reached by a plain read() syscall on /proc/sys/dev/parport/parportN/autoprobe (and siblings), which requires local access to the system. No network or physical interaction with the machine is needed by the attacker at exploit time on a host that already has a parallel-port peripheral attached.\nAC:L - Once a parport peripheral with a device ID exceeding the 256-byte stack buffer is present — a common configuration, since real IEEE 1284 device IDs frequently run 300+ bytes and can be up to 1024 — the attacker triggers the overflow deterministically and repeatedly by simply reading the file with a large count. There is no race, no memory-layout guessing, and no per-attempt effort.\nPR:L - The sysctl entries are registered with .mode = 0444 and sysctl_perm() enforces nothing beyond that, so any unprivileged local account can read them. No capability, no root, and no user-namespace trickery is required.\nUI:N - The attacker performs the read themselves; no victim action, mount, or file-open by another user is needed.\nS:U - The corruption and the disclosure are confined to the kernel's own stack within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - memcpy(result, buffer, len) with len > sizeof(buffer) copies hundreds of bytes of adjacent kernel stack into the sysctl output buffer, which is then copied straight to userspace — a direct kernel stack memory disclosure exposing stack canaries, saved registers, and kernel pointers usable to defeat KASLR.\nI:H - In do_autoprobe(), sizeof(buffer) - len underflows to a huge size_t once len exceeds 256, giving an unbounded write of peripheral-controlled string data past the end of a 256-byte stack buffer — overwriting saved registers and the return address, which is exploitable for control-flow hijacking.\nA:H - Stack corruption in these handlers triggers __stack_chk_fail() and a non-syncing kernel panic, as demonstrated in the original bug report's backtrace; an unprivileged user can induce it at will."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:41:24.682Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19.320","versionEndExcluding":"4.19.323"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4.282","versionEndExcluding":"5.4.285"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10.224","versionEndExcluding":"5.10.228"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15.165","versionEndExcluding":"5.15.169"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.103","versionEndExcluding":"6.1.114"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.44","versionEndExcluding":"6.6.58"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.11.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T22:25:09.766Z"}}]}}}