{"id":"CVE-2026-143096","summary":"spi: axi-spi-engine: Start the program length at zero","details":"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.","modified":"2026-12-03T11:01:19.465940644Z","published":"2026-12-03T09:19:16.667Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143096.json","cna_assigner":"Linux"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/20e028e01d62557de76c8da648ae52e0ad487c27"},{"type":"WEB","url":"https://git.kernel.org/stable/c/2a490521d74ac76e5eb3c9a69d928a4c76dd3f78"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143096.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143096"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"69050f8d6d075dc01af7a5f2f550a8067510366f"},{"fixed":"20e028e01d62557de76c8da648ae52e0ad487c27"},{"fixed":"2a490521d74ac76e5eb3c9a69d928a4c76dd3f78"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143096.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.0.0"},{"fixed":"7.3.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143096.json"}}],"schema_version":"1.9.2"}