{"id":"CVE-2022-49320","state":"PUBLISHED","title":"dmaengine: zynqmp_dma: In struct zynqmp_dma_chan fix desc_size data type","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndmaengine: zynqmp_dma: In struct zynqmp_dma_chan fix desc_size data type\n\nIn zynqmp_dma_alloc/free_chan_resources functions there is a\npotential overflow in the below expressions.\n\ndma_alloc_coherent(chan->dev, (2 * chan->desc_size *\n\t\t   ZYNQMP_DMA_NUM_DESCS),\n\t\t   &chan->desc_pool_p, GFP_KERNEL);\n\ndma_free_coherent(chan->dev,(2 * ZYNQMP_DMA_DESC_SIZE(chan) *\n                 ZYNQMP_DMA_NUM_DESCS),\n                chan->desc_pool_v, chan->desc_pool_p);\n\nThe arguments desc_size and ZYNQMP_DMA_NUM_DESCS were 32 bit. Though\nthis overflow condition is not observed but it is a potential problem\nin the case of 32-bit multiplication. Hence fix it by changing the\ndesc_size data type to size_t.\n\nIn addition to coverity fix it also reuse ZYNQMP_DMA_DESC_SIZE macro in\ndma_alloc_coherent API argument.\n\nAddresses-Coverity: Event overflow_before_widen.","publishedAt":"2025-02-26T02:10:45.703Z","updatedAt":"2026-05-11T18:57:25.070Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b0cc417c1637192be658e68a74c8d1568e3d35f6","status":"affected","lessThan":"83960276ffc9bf5570d4106490346b61e61be5f3","versionType":"git"},{"version":"b0cc417c1637192be658e68a74c8d1568e3d35f6","status":"affected","lessThan":"95a0ba85c1b51b36e909841c02d205cd223ab753","versionType":"git"},{"version":"b0cc417c1637192be658e68a74c8d1568e3d35f6","status":"affected","lessThan":"7b5488f4721fed6e121e661e165bab06ae2f8675","versionType":"git"},{"version":"b0cc417c1637192be658e68a74c8d1568e3d35f6","status":"affected","lessThan":"4838969e4d95d2bd2995d1605b20d3144fcb3e74","versionType":"git"},{"version":"b0cc417c1637192be658e68a74c8d1568e3d35f6","status":"affected","lessThan":"90aefae2e3a770a6909d339f5d8a988c0b0ceaf0","versionType":"git"},{"version":"b0cc417c1637192be658e68a74c8d1568e3d35f6","status":"affected","lessThan":"f9a9f43a62a04ec3183fb0da9226c7706eed0115","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma/xilinx/zynqmp_dma.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.8","versionType":"semver"},{"version":"5.4.198","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.122","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.47","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.17.15","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18.4","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma/xilinx/zynqmp_dma.c"]}],"references":["https://git.kernel.org/stable/c/83960276ffc9bf5570d4106490346b61e61be5f3","https://git.kernel.org/stable/c/95a0ba85c1b51b36e909841c02d205cd223ab753","https://git.kernel.org/stable/c/7b5488f4721fed6e121e661e165bab06ae2f8675","https://git.kernel.org/stable/c/4838969e4d95d2bd2995d1605b20d3144fcb3e74","https://git.kernel.org/stable/c/90aefae2e3a770a6909d339f5d8a988c0b0ceaf0","https://git.kernel.org/stable/c/f9a9f43a62a04ec3183fb0da9226c7706eed0115"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49320.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49320","state":"PUBLISHED","datePublished":"2025-02-26T02:10:45.703Z","dateUpdated":"2026-05-11T18:57:25.070Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-02-26T02:08:31.537Z"},"containers":{"cna":{"title":"dmaengine: zynqmp_dma: In struct zynqmp_dma_chan fix desc_size data type","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndmaengine: zynqmp_dma: In struct zynqmp_dma_chan fix desc_size data type\n\nIn zynqmp_dma_alloc/free_chan_resources functions there is a\npotential overflow in the below expressions.\n\ndma_alloc_coherent(chan->dev, (2 * chan->desc_size *\n\t\t   ZYNQMP_DMA_NUM_DESCS),\n\t\t   &chan->desc_pool_p, GFP_KERNEL);\n\ndma_free_coherent(chan->dev,(2 * ZYNQMP_DMA_DESC_SIZE(chan) *\n                 ZYNQMP_DMA_NUM_DESCS),\n                chan->desc_pool_v, chan->desc_pool_p);\n\nThe arguments desc_size and ZYNQMP_DMA_NUM_DESCS were 32 bit. Though\nthis overflow condition is not observed but it is a potential problem\nin the case of 32-bit multiplication. Hence fix it by changing the\ndesc_size data type to size_t.\n\nIn addition to coverity fix it also reuse ZYNQMP_DMA_DESC_SIZE macro in\ndma_alloc_coherent API argument.\n\nAddresses-Coverity: Event overflow_before_widen."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b0cc417c1637192be658e68a74c8d1568e3d35f6","status":"affected","lessThan":"83960276ffc9bf5570d4106490346b61e61be5f3","versionType":"git"},{"version":"b0cc417c1637192be658e68a74c8d1568e3d35f6","status":"affected","lessThan":"95a0ba85c1b51b36e909841c02d205cd223ab753","versionType":"git"},{"version":"b0cc417c1637192be658e68a74c8d1568e3d35f6","status":"affected","lessThan":"7b5488f4721fed6e121e661e165bab06ae2f8675","versionType":"git"},{"version":"b0cc417c1637192be658e68a74c8d1568e3d35f6","status":"affected","lessThan":"4838969e4d95d2bd2995d1605b20d3144fcb3e74","versionType":"git"},{"version":"b0cc417c1637192be658e68a74c8d1568e3d35f6","status":"affected","lessThan":"90aefae2e3a770a6909d339f5d8a988c0b0ceaf0","versionType":"git"},{"version":"b0cc417c1637192be658e68a74c8d1568e3d35f6","status":"affected","lessThan":"f9a9f43a62a04ec3183fb0da9226c7706eed0115","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma/xilinx/zynqmp_dma.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.8","versionType":"semver"},{"version":"5.4.198","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.122","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.47","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.17.15","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18.4","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma/xilinx/zynqmp_dma.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/83960276ffc9bf5570d4106490346b61e61be5f3"},{"url":"https://git.kernel.org/stable/c/95a0ba85c1b51b36e909841c02d205cd223ab753"},{"url":"https://git.kernel.org/stable/c/7b5488f4721fed6e121e661e165bab06ae2f8675"},{"url":"https://git.kernel.org/stable/c/4838969e4d95d2bd2995d1605b20d3144fcb3e74"},{"url":"https://git.kernel.org/stable/c/90aefae2e3a770a6909d339f5d8a988c0b0ceaf0"},{"url":"https://git.kernel.org/stable/c/f9a9f43a62a04ec3183fb0da9226c7706eed0115"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T18:57:25.070Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"5.4.198"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"5.10.122"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"5.15.47"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"5.17.15"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"5.18.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"5.19"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}