ieee802154: ca8210: fix cas_ctl leak on spi_async failure
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: ieee802154: ca8210: fix cas_ctl leak on spi_async failure ca8210_spi_transfer() allocates cas_ctl with kzalloc_obj(GFP_ATOMIC) and relies entirely on the SPI completion callback ca8210_spi_transfer_complete() to free it. The spi_async() API only invokes the completion callback on successful submission. On failure it returns a negative error code without ever queuing the callback, which leaves cas_ctl and its embedded spi_message and spi_transfer orphaned. Every kfree(cas_ctl) in the driver is inside the completion callback, so there is no other reclamation path. ca8210_spi_transfer() is called from ca8210_spi_exchange(), the interrupt handler ca8210_interrupt_handler(), and from the retry path inside the completion callback itself. The exchange and interrupt handler paths loop on -EBUSY, so under sustained SPI bus contention every retry iteration leaks a fresh cas_ctl (~600 bytes per occurrence). Fix it by freeing cas_ctl on the spi_async() error path. While here, correct the misleading error string: the function calls spi_async(), not spi_sync().
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
Version range not reported
- Linux Linux
4.12
References 8
git.kernel.org
- stable/c/460c5cd51e4d7d15b317f178f42cfcb666c0fe91
- stable/c/b07aea90dbc6e188c74c100af64b77b9482ffc65
- stable/c/fe90605b651573d30be8293ff5be40e3d7023117
- stable/c/b9071dc7889bef42590e04fbf3e56cc65e1e5e6e
- stable/c/d4a397fe803c2d157f6ebb068b802ef75fbf109e
- stable/c/cb5cca1d2a908ddd5e357971de0f2009617b8d6a
- stable/c/7e3630fbb6aabb844bbf35746dee0bf3894100c7
- stable/c/e09390e439bd7cca30dd10893b1f64802961667a