{"id":"CVE-2026-143096","state":"PUBLISHED","title":"spi: axi-spi-engine: Start the program length at zero","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: axi-spi-engine: Start the program length at zero\n\nspi_engine_optimize_message() allocates the program with kzalloc_flex(),\nwhich sets the __counted_by() counter \"length\" to the allocated size when\nthe compiler supports __builtin_counted_by_ref(). The program is then\nfilled by spi_engine_program_add_cmd(), which increments \"length\" and\nstores at length - 1, expecting it to start at zero as it did when the\nprogram came from kzalloc().\n\nReset \"length\" after the allocation, since it is a \"usage\" counter, not\na \"total allocation\" counter.\n\nBuild tested ARCH=x86_64 defconfig with CONFIG_SPI_AXI_SPI_ENGINE=m and\nW=1, with GCC 16.2.0.","publishedAt":"2026-12-03T09:19:16.667Z","updatedAt":"2026-12-03T09:19:16.667Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"69050f8d6d075dc01af7a5f2f550a8067510366f","status":"affected","lessThan":"20e028e01d62557de76c8da648ae52e0ad487c27","versionType":"git"},{"version":"69050f8d6d075dc01af7a5f2f550a8067510366f","status":"affected","lessThan":"2a490521d74ac76e5eb3c9a69d928a4c76dd3f78","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-axi-spi-engine.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.0","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-axi-spi-engine.c"]}],"references":["https://git.kernel.org/stable/c/20e028e01d62557de76c8da648ae52e0ad487c27","https://git.kernel.org/stable/c/2a490521d74ac76e5eb3c9a69d928a4c76dd3f78"],"weaknesses":[],"ingestedAt":"2026-12-03T09:28:04.553Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143096.json","commit":"9fd484e43f2e14021809e195d28c1172759faad0","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143096","state":"PUBLISHED","datePublished":"2026-12-03T09:19:16.667Z","dateUpdated":"2026-12-03T09:19:16.667Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.348Z"},"containers":{"cna":{"title":"spi: axi-spi-engine: Start the program length at zero","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: axi-spi-engine: Start the program length at zero\n\nspi_engine_optimize_message() allocates the program with kzalloc_flex(),\nwhich sets the __counted_by() counter \"length\" to the allocated size when\nthe compiler supports __builtin_counted_by_ref(). The program is then\nfilled by spi_engine_program_add_cmd(), which increments \"length\" and\nstores at length - 1, expecting it to start at zero as it did when the\nprogram came from kzalloc().\n\nReset \"length\" after the allocation, since it is a \"usage\" counter, not\na \"total allocation\" counter.\n\nBuild tested ARCH=x86_64 defconfig with CONFIG_SPI_AXI_SPI_ENGINE=m and\nW=1, with GCC 16.2.0."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"69050f8d6d075dc01af7a5f2f550a8067510366f","status":"affected","lessThan":"20e028e01d62557de76c8da648ae52e0ad487c27","versionType":"git"},{"version":"69050f8d6d075dc01af7a5f2f550a8067510366f","status":"affected","lessThan":"2a490521d74ac76e5eb3c9a69d928a4c76dd3f78","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-axi-spi-engine.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.0","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-axi-spi-engine.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/20e028e01d62557de76c8da648ae52e0ad487c27"},{"url":"https://git.kernel.org/stable/c/2a490521d74ac76e5eb3c9a69d928a4c76dd3f78"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:19:16.667Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.0","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.0","versionEndExcluding":"7.4-rc3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}