{"id":"CVE-2022-50623","state":"PUBLISHED","title":"fpga: prevent integer overflow in dfl_feature_ioctl_set_irq()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nfpga: prevent integer overflow in dfl_feature_ioctl_set_irq()\n\nThe \"hdr.count * sizeof(s32)\" multiplication can overflow on 32 bit\nsystems leading to memory corruption.  Use array_size() to fix that.","publishedAt":"2025-12-08T01:16:37.086Z","updatedAt":"2026-08-05T08:59:12.762Z","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":"322b598be4d9b9090cda560c4caab78704615ab4","status":"affected","lessThan":"f59861946fa51bcc1f305809e4ebc1013b0ee61c","versionType":"git"},{"version":"322b598be4d9b9090cda560c4caab78704615ab4","status":"affected","lessThan":"b94605f5cb99e90c8ca91523597a40e1bd59546b","versionType":"git"},{"version":"322b598be4d9b9090cda560c4caab78704615ab4","status":"affected","lessThan":"1b5a931594f7ffd26d706614c37d4da0f2ffb6e7","versionType":"git"},{"version":"322b598be4d9b9090cda560c4caab78704615ab4","status":"affected","lessThan":"940253af8b3865b76de8d1b46bcd4a700104852e","versionType":"git"},{"version":"322b598be4d9b9090cda560c4caab78704615ab4","status":"affected","lessThan":"939bc5453b8cbdde9f1e5110ce8309aedb1b501a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/fpga/dfl.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.9","versionType":"semver"},{"version":"5.10.150","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.75","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.19.17","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0.3","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/fpga/dfl.c"]}],"references":["https://git.kernel.org/stable/c/f59861946fa51bcc1f305809e4ebc1013b0ee61c","https://git.kernel.org/stable/c/b94605f5cb99e90c8ca91523597a40e1bd59546b","https://git.kernel.org/stable/c/1b5a931594f7ffd26d706614c37d4da0f2ffb6e7","https://git.kernel.org/stable/c/940253af8b3865b76de8d1b46bcd4a700104852e","https://git.kernel.org/stable/c/939bc5453b8cbdde9f1e5110ce8309aedb1b501a"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/50xxx/CVE-2022-50623.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50623","state":"PUBLISHED","datePublished":"2025-12-08T01:16:37.086Z","dateUpdated":"2026-08-05T08:59:12.762Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-08T01:14:55.190Z"},"containers":{"cna":{"title":"fpga: prevent integer overflow in dfl_feature_ioctl_set_irq()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nfpga: prevent integer overflow in dfl_feature_ioctl_set_irq()\n\nThe \"hdr.count * sizeof(s32)\" multiplication can overflow on 32 bit\nsystems leading to memory corruption.  Use array_size() to fix that."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"322b598be4d9b9090cda560c4caab78704615ab4","status":"affected","lessThan":"f59861946fa51bcc1f305809e4ebc1013b0ee61c","versionType":"git"},{"version":"322b598be4d9b9090cda560c4caab78704615ab4","status":"affected","lessThan":"b94605f5cb99e90c8ca91523597a40e1bd59546b","versionType":"git"},{"version":"322b598be4d9b9090cda560c4caab78704615ab4","status":"affected","lessThan":"1b5a931594f7ffd26d706614c37d4da0f2ffb6e7","versionType":"git"},{"version":"322b598be4d9b9090cda560c4caab78704615ab4","status":"affected","lessThan":"940253af8b3865b76de8d1b46bcd4a700104852e","versionType":"git"},{"version":"322b598be4d9b9090cda560c4caab78704615ab4","status":"affected","lessThan":"939bc5453b8cbdde9f1e5110ce8309aedb1b501a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/fpga/dfl.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.9","versionType":"semver"},{"version":"5.10.150","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.75","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.19.17","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0.3","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/fpga/dfl.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/f59861946fa51bcc1f305809e4ebc1013b0ee61c"},{"url":"https://git.kernel.org/stable/c/b94605f5cb99e90c8ca91523597a40e1bd59546b"},{"url":"https://git.kernel.org/stable/c/1b5a931594f7ffd26d706614c37d4da0f2ffb6e7"},{"url":"https://git.kernel.org/stable/c/940253af8b3865b76de8d1b46bcd4a700104852e"},{"url":"https://git.kernel.org/stable/c/939bc5453b8cbdde9f1e5110ce8309aedb1b501a"}],"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 vulnerability is reached via ioctl on local DFL character devices (/dev/dfl-port.* or /dev/dfl-fme.*) through afu_ioctl/fme_ioctl into dfl_feature_ioctl_set_irq(); it is not reachable from network packet processing or physical bus injection.\nAC:L - An attacker who can open the device fully controls hdr.start/hdr.count and the eventfd array and can issue the SET_IRQ ioctl directly; triggering the overflow path does not depend on a race or other conditions outside the attacker’s influence.\nPR:L - Neither open nor the SET_IRQ ioctl path checks capabilities—only device-node permissions—and DFL ports/AFUs are explicitly intended for userspace applications, including SR-IOV VF tenants and deployments that grant group access via udev, so real root is not required.\nUI:N - The attacker opens the DFL device and issues DFL_FPGA_*_SET_IRQ themselves; no separate victim action such as mounting a filesystem or opening a crafted file is required.\nS:U - Impact is memory corruption within the host (or guest, under VF passthrough) kernel’s DFL driver privilege boundary; this is ordinary local kernel compromise, not a VM escape or IOMMU/cross-authority bypass.\nC:H - The integer overflow causes memdup_user() to allocate an undersized buffer while the code still iterates hdr.count entries, producing an out-of-bounds kernel heap read of the fds array that can be leveraged for information disclosure under memory-corruption guidance.\nI:H - The commit documents memory corruption from the wrapped allocation size; an undersized heap object consumed as a large fd array is exploitable for integrity compromise and control-flow impact consistent with kernel scoring of similar memdup_user overflows.\nA:H - Out-of-bounds access of the undersized fds buffer can oops/panic the kernel (including KASAN or unmapped heap pages), which is high availability impact under kernel CVSS guidance."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:59:12.762Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"5.10.150"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"5.15.75"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"5.19.17"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.0.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}