In the Linux kernel, the following vulnerability has been resolved:
spi: bcm2835: bcm2835spihandle_err(): fix NULL pointer deref for non DMA transfers
In case a IRQ based transfer times out the bcm2835spihandleerr() function is called. Since commit 1513ceee70f2 ("spi: bcm2835: Drop dmapending flag") the TX and RX DMA transfers are unconditionally canceled, leading to NULL pointer derefs if ctlr->dmatx or ctlr->dmarx are not set.
Fix the NULL pointer deref by checking that ctlr->dmatx and ctlr->dmarx are valid pointers before accessing them.
[
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "108532166455409356188470043081984541122",
"length": 258.0
},
"target": {
"function": "bcm2835_spi_handle_err",
"file": "drivers/spi/spi-bcm2835.c"
},
"id": "CVE-2022-49569-2b25135c",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@76668d2a2f367d25ff448e6d7087406af7d7bb2b",
"signature_type": "Function"
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "284652873661614699359975781593812685214",
"length": 256.0
},
"target": {
"function": "bcm2835_spi_handle_err",
"file": "drivers/spi/spi-bcm2835.c"
},
"id": "CVE-2022-49569-3a054713",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4ceaa684459d414992acbefb4e4c31f2dfc50641",
"signature_type": "Function"
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "284652873661614699359975781593812685214",
"length": 256.0
},
"target": {
"function": "bcm2835_spi_handle_err",
"file": "drivers/spi/spi-bcm2835.c"
},
"id": "CVE-2022-49569-4e8a0767",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58466e05390043d2805685c70f55f3f59711bdf2",
"signature_type": "Function"
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "284652873661614699359975781593812685214",
"length": 256.0
},
"target": {
"function": "bcm2835_spi_handle_err",
"file": "drivers/spi/spi-bcm2835.c"
},
"id": "CVE-2022-49569-72156553",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@49ffa473218012e765682343de2052eb4c1f06a7",
"signature_type": "Function"
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"24963524056652323621457156374113625437",
"302442691929591145182220485381219249356",
"4712848206439269490361217023746077015",
"2877695873736011628090393073874525401",
"281896618213021208232787728166257680671",
"16767615979301942709320577866868443564",
"158879681935404210148570638487000406155"
],
"threshold": 0.9
},
"target": {
"file": "drivers/spi/spi-bcm2835.c"
},
"id": "CVE-2022-49569-7fca7baf",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58466e05390043d2805685c70f55f3f59711bdf2",
"signature_type": "Line"
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"24963524056652323621457156374113625437",
"302442691929591145182220485381219249356",
"4712848206439269490361217023746077015",
"2877695873736011628090393073874525401",
"281896618213021208232787728166257680671",
"16767615979301942709320577866868443564",
"158879681935404210148570638487000406155"
],
"threshold": 0.9
},
"target": {
"file": "drivers/spi/spi-bcm2835.c"
},
"id": "CVE-2022-49569-8981899a",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@49ffa473218012e765682343de2052eb4c1f06a7",
"signature_type": "Line"
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"24963524056652323621457156374113625437",
"302442691929591145182220485381219249356",
"4712848206439269490361217023746077015",
"2877695873736011628090393073874525401",
"281896618213021208232787728166257680671",
"16767615979301942709320577866868443564",
"158879681935404210148570638487000406155"
],
"threshold": 0.9
},
"target": {
"file": "drivers/spi/spi-bcm2835.c"
},
"id": "CVE-2022-49569-96d76b58",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@684896e675edd8b669fd3e9f547c5038222d85bc",
"signature_type": "Line"
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"24963524056652323621457156374113625437",
"302442691929591145182220485381219249356",
"4712848206439269490361217023746077015",
"2877695873736011628090393073874525401",
"281896618213021208232787728166257680671",
"16767615979301942709320577866868443564",
"158879681935404210148570638487000406155"
],
"threshold": 0.9
},
"target": {
"file": "drivers/spi/spi-bcm2835.c"
},
"id": "CVE-2022-49569-a11eff4c",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4ceaa684459d414992acbefb4e4c31f2dfc50641",
"signature_type": "Line"
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"line_hashes": [
"24963524056652323621457156374113625437",
"302442691929591145182220485381219249356",
"4712848206439269490361217023746077015",
"2877695873736011628090393073874525401",
"281896618213021208232787728166257680671",
"61634109508852910139529851359157247400",
"326818159882452413154052363943722598263"
],
"threshold": 0.9
},
"target": {
"file": "drivers/spi/spi-bcm2835.c"
},
"id": "CVE-2022-49569-f509f1e0",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@76668d2a2f367d25ff448e6d7087406af7d7bb2b",
"signature_type": "Line"
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"function_hash": "284652873661614699359975781593812685214",
"length": 256.0
},
"target": {
"function": "bcm2835_spi_handle_err",
"file": "drivers/spi/spi-bcm2835.c"
},
"id": "CVE-2022-49569-fae5fc9a",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@684896e675edd8b669fd3e9f547c5038222d85bc",
"signature_type": "Function"
}
]