CVE-2022-49569

spi: bcm2835: bcm2835_spi_handle_err(): fix NULL pointer deref for non DMA transfers

State
Published
Severity
5.5 Medium
Published
Feb 26, 2025
Updated
May 11, 2026
Reserved
Feb 26, 2025

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

spi: bcm2835: bcm2835_spi_handle_err(): fix NULL pointer deref for non DMA transfers

In case a IRQ based transfer times out the bcm2835_spi_handle_err() function is called. Since commit 1513ceee70f2 ("spi: bcm2835: Drop dma_pending flag") the TX and RX DMA transfers are unconditionally canceled, leading to NULL pointer derefs if ctlr->dma_tx or ctlr->dma_rx are not set.

Fix the NULL pointer deref by checking that ctlr->dma_tx and ctlr->dma_rx are valid pointers before accessing them.

Scores

CVSSScoreVectorSource
3.15.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HCISA-ADP

Weaknesses

Affected Products

ProductVersions
LinuxLinux
  • 1513ceee70f2bd523e025efe0c715328e1a43ffd to before 76668d2a2f367d25ff448e6d7087406af7d7bb2bAffected
  • 1513ceee70f2bd523e025efe0c715328e1a43ffd to before 684896e675edd8b669fd3e9f547c5038222d85bcAffected
  • 1513ceee70f2bd523e025efe0c715328e1a43ffd to before 58466e05390043d2805685c70f55f3f59711bdf2Affected
  • 1513ceee70f2bd523e025efe0c715328e1a43ffd to before 49ffa473218012e765682343de2052eb4c1f06a7Affected
  • 1513ceee70f2bd523e025efe0c715328e1a43ffd to before 4ceaa684459d414992acbefb4e4c31f2dfc50641Affected
LinuxLinux
  • 5.4Affected
  • before 5.4Not affected
  • 5.4.208 through 5.4.*Not affected
  • 5.10.134 through 5.10.*Not affected
  • 5.15.58 through 5.15.*Not affected
  • 5.18.15 through 5.18.*Not affected
  • 5.19 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.