In the Linux kernel, the following vulnerability has been resolved:
spi: Fix null dereference on suspend
A race condition exists where a synchronous (noqueue) transfer can be active during a system suspend. This can cause a null pointer dereference exception to occur when the system resumes.
Example order of events leading to the exception: 1. spisync() calls _spitransfermessagenoqueue() which sets ctlr->curmsg 2. Spi transfer begins via spitransferonemessage() 3. System is suspended interrupting the transfer context 4. System is resumed 6. spicontrollerresume() calls spistartqueue() which resets curmsg to NULL 7. Spi transfer context resumes and spifinalizecurrentmessage() is called which dereferences curmsg (which is now NULL)
Wait for synchronous transfers to complete before suspending by acquiring the bus mutex and setting/checking a suspend flag.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96474ea47dc67b0704392d59192b233c8197db0e",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-08021d56",
"target": {
"file": "drivers/spi/spi.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"314723947086492937824026043565380443798",
"40871948330083570665214212389711511974",
"70409234700200887439752115089239335666",
"149608282380350143452899584660869474027",
"190261980884358358372869078192338895277",
"239137713049700774093317200027428899840",
"313342692746240154880877553764276342531",
"79681103291433623218514629038944144651",
"313031265848467169060999053397597052869",
"234963300707315020638861006962232740936",
"236836098359386154576852465799602829020",
"158680400789703215999410601283837575323",
"205680302813559457753159051581346221270",
"299061226084419422340930838102133827004",
"174875157900835736929302115473532374340",
"190261980884358358372869078192338895277",
"310396086774883653952867162327693777127",
"98182927179786975081147339552668937928",
"332960854776816323561683995084747767345",
"53425817037702154309460618107347140772",
"309664902151408001827640097129189021461",
"129108344142196142986488493610102101538",
"201420013587757826624926779722461696084",
"206018680031082185692189086172294912250",
"291638284135508571589855974755345218035",
"164419120595931938403555832066083282082",
"137249705951067217721421585603083713961",
"47856060554244759730232239185193539315",
"226783360354536045242382666706211371509",
"25280622604749780970801685137655910283",
"227180892873505356018311178128154310747",
"15637933180737005616222135766160920592",
"301440305335205948891581047416957429089"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4ec4508db97502a12daee88c74782e8d35ced068",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-13dfcc0c",
"target": {
"function": "__spi_transfer_message_noqueue",
"file": "drivers/spi/spi.c"
},
"digest": {
"length": 651.0,
"function_hash": "100197569776501874772501051795198728554"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4ec4508db97502a12daee88c74782e8d35ced068",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-2022f3e4",
"target": {
"function": "spi_controller_resume",
"file": "drivers/spi/spi.c"
},
"digest": {
"length": 192.0,
"function_hash": "171373831271660443741500528266464598554"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bef4a48f4ef798c4feddf045d49e53c8a97d5e37",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-234be373",
"target": {
"function": "__spi_sync",
"file": "drivers/spi/spi.c"
},
"digest": {
"length": 832.0,
"function_hash": "252809988234241391927236171557582028454"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4ec4508db97502a12daee88c74782e8d35ced068",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-25798745",
"target": {
"function": "__spi_sync",
"file": "drivers/spi/spi.c"
},
"digest": {
"length": 832.0,
"function_hash": "252809988234241391927236171557582028454"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bef4a48f4ef798c4feddf045d49e53c8a97d5e37",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-30e338fc",
"target": {
"function": "spi_controller_resume",
"file": "drivers/spi/spi.c"
},
"digest": {
"length": 192.0,
"function_hash": "171373831271660443741500528266464598554"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96474ea47dc67b0704392d59192b233c8197db0e",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-3430ea35",
"target": {
"function": "__spi_transfer_message_noqueue",
"file": "drivers/spi/spi.c"
},
"digest": {
"length": 651.0,
"function_hash": "100197569776501874772501051795198728554"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4ec4508db97502a12daee88c74782e8d35ced068",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-48834b13",
"target": {
"file": "drivers/spi/spi.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"314723947086492937824026043565380443798",
"40871948330083570665214212389711511974",
"70409234700200887439752115089239335666",
"149608282380350143452899584660869474027",
"190261980884358358372869078192338895277",
"239137713049700774093317200027428899840",
"313342692746240154880877553764276342531",
"79681103291433623218514629038944144651",
"313031265848467169060999053397597052869",
"234963300707315020638861006962232740936",
"236836098359386154576852465799602829020",
"158680400789703215999410601283837575323",
"205680302813559457753159051581346221270",
"299061226084419422340930838102133827004",
"174875157900835736929302115473532374340",
"190261980884358358372869078192338895277",
"310396086774883653952867162327693777127",
"98182927179786975081147339552668937928",
"332960854776816323561683995084747767345",
"53425817037702154309460618107347140772",
"309664902151408001827640097129189021461",
"129108344142196142986488493610102101538",
"201420013587757826624926779722461696084",
"206018680031082185692189086172294912250",
"291638284135508571589855974755345218035",
"164419120595931938403555832066083282082",
"137249705951067217721421585603083713961",
"47856060554244759730232239185193539315",
"226783360354536045242382666706211371509",
"25280622604749780970801685137655910283",
"227180892873505356018311178128154310747",
"15637933180737005616222135766160920592",
"301440305335205948891581047416957429089"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96474ea47dc67b0704392d59192b233c8197db0e",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-4b539076",
"target": {
"function": "spi_controller_resume",
"file": "drivers/spi/spi.c"
},
"digest": {
"length": 192.0,
"function_hash": "171373831271660443741500528266464598554"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96474ea47dc67b0704392d59192b233c8197db0e",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-51f65d93",
"target": {
"function": "spi_controller_suspend",
"file": "drivers/spi/spi.c"
},
"digest": {
"length": 189.0,
"function_hash": "313171084656719370571527073753500568672"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bef4a48f4ef798c4feddf045d49e53c8a97d5e37",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-80918dbf",
"target": {
"function": "spi_controller_suspend",
"file": "drivers/spi/spi.c"
},
"digest": {
"length": 189.0,
"function_hash": "313171084656719370571527073753500568672"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bef4a48f4ef798c4feddf045d49e53c8a97d5e37",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-a43797ab",
"target": {
"function": "__spi_transfer_message_noqueue",
"file": "drivers/spi/spi.c"
},
"digest": {
"length": 651.0,
"function_hash": "100197569776501874772501051795198728554"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96474ea47dc67b0704392d59192b233c8197db0e",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-cb8e4629",
"target": {
"function": "__spi_sync",
"file": "drivers/spi/spi.c"
},
"digest": {
"length": 832.0,
"function_hash": "252809988234241391927236171557582028454"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4ec4508db97502a12daee88c74782e8d35ced068",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-d1fe520e",
"target": {
"function": "spi_controller_suspend",
"file": "drivers/spi/spi.c"
},
"digest": {
"length": 189.0,
"function_hash": "313171084656719370571527073753500568672"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bef4a48f4ef798c4feddf045d49e53c8a97d5e37",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52749-f19c3e36",
"target": {
"file": "drivers/spi/spi.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"314723947086492937824026043565380443798",
"40871948330083570665214212389711511974",
"70409234700200887439752115089239335666",
"149608282380350143452899584660869474027",
"190261980884358358372869078192338895277",
"239137713049700774093317200027428899840",
"313342692746240154880877553764276342531",
"79681103291433623218514629038944144651",
"313031265848467169060999053397597052869",
"234963300707315020638861006962232740936",
"236836098359386154576852465799602829020",
"158680400789703215999410601283837575323",
"205680302813559457753159051581346221270",
"299061226084419422340930838102133827004",
"174875157900835736929302115473532374340",
"190261980884358358372869078192338895277",
"310396086774883653952867162327693777127",
"98182927179786975081147339552668937928",
"332960854776816323561683995084747767345",
"53425817037702154309460618107347140772",
"309664902151408001827640097129189021461",
"129108344142196142986488493610102101538",
"201420013587757826624926779722461696084",
"206018680031082185692189086172294912250",
"291638284135508571589855974755345218035",
"164419120595931938403555832066083282082",
"137249705951067217721421585603083713961",
"47856060554244759730232239185193539315",
"226783360354536045242382666706211371509",
"25280622604749780970801685137655910283",
"227180892873505356018311178128154310747",
"15637933180737005616222135766160920592",
"301440305335205948891581047416957429089"
]
},
"signature_type": "Line"
}
]