spi: spi-qpic-snand: reallocate BAM transactions
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
spi: spi-qpic-snand: reallocate BAM transactions
Using the mtd_nandbiterrs module for testing the driver occasionally results in weird things like below.
1. swiotlb mapping fails with the following message:
[ 85.926216] qcom_snand 79b0000.spi: swiotlb buffer is full (sz: 4294967294 bytes), total 512 (slots), used 0 (slots) [ 85.932937] qcom_snand 79b0000.spi: failure in mapping desc [ 87.999314] qcom_snand 79b0000.spi: failure to write raw page [ 87.999352] mtd_nandbiterrs: error: write_oob failed (-110)
Rebooting the board after this causes a panic due to a NULL pointer dereference.
2. If the swiotlb mapping does not fail, rebooting the board may result in a different panic due to a bad spinlock magic:
[ 256.104459] BUG: spinlock bad magic on CPU#3, procd/2241 [ 256.104488] Unable to handle kernel paging request at virtual address ffffffff0000049b ...
From the CVE record · Linux
The Linux kernel’s spi-qpic-snand driver can access memory outside its allocated BAM transaction arrays when a flash operation needs more transactions than the arrays can hold. This can corrupt memory and cause a kernel panic; the issue was observed during local testing with the mtd_nandbiterrs module. The input does not establish whether an attacker can trigger it or what privileges would be required.
Engineers running Linux kernels with the spi-qpic-snand driver should check their systems; affected versions are not specified.