In the Linux kernel, the following vulnerability has been resolved:
cifs: fix potential null pointer use in destroyworkqueue in initcifs error path
Dan Carpenter reported a Smack static checker warning: fs/smb/client/cifsfs.c:1981 initcifs() error: we previously assumed 'serverclosewq' could be null (see line 1895)
The patch which introduced the serverclose workqueue used the wrong oredering in error paths in init_cifs() for freeing it on errors.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6018971710fdc7739f8655c1540832b4bb903671",
"target": {
"function": "init_cifs",
"file": "fs/smb/client/cifsfs.c"
},
"id": "CVE-2024-42307-059bc13c",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"function_hash": "222493237373073227433133487338286727348",
"length": 3820.0
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@160235efb4f9b55212dedff5de0094c606c4b303",
"target": {
"file": "fs/smb/client/cifsfs.c"
},
"id": "CVE-2024-42307-141a0de4",
"signature_type": "Line",
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"181565232978814585872632120044746034109",
"151893783942539028942915456611437037007",
"228365380169201708761270589582674093496",
"247072749202489163069443021914431621170",
"334289360394793102250647988483952640525",
"23826475980615322697476034985909513798",
"1766446135039008449281196298260708180",
"182110142763536309092557263309722060676",
"289477144313557318600807891758063081368",
"212055771980784278360903296573860259330",
"222730213852609048167808084116786041013",
"193757000735894271002824071313854998935",
"146133166602735154029354390596097865921",
"123340329066391264774193280050208863020",
"97477486829626414268000411655559140260",
"43706867515581433992862507778325464584",
"263946375394076876295090603438344734405"
]
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3739d711246d8fbc95ff73dbdace9741cdce4777",
"target": {
"function": "init_cifs",
"file": "fs/smb/client/cifsfs.c"
},
"id": "CVE-2024-42307-1a373196",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"function_hash": "53976690338882747234772070321518472530",
"length": 4048.0
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@160235efb4f9b55212dedff5de0094c606c4b303",
"target": {
"function": "init_cifs",
"file": "fs/smb/client/cifsfs.c"
},
"id": "CVE-2024-42307-370c176a",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"function_hash": "130001721258507944865651498934792849858",
"length": 3956.0
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3739d711246d8fbc95ff73dbdace9741cdce4777",
"target": {
"file": "fs/smb/client/cifsfs.c"
},
"id": "CVE-2024-42307-74e89009",
"signature_type": "Line",
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"181565232978814585872632120044746034109",
"151893783942539028942915456611437037007",
"228365380169201708761270589582674093496",
"247072749202489163069443021914431621170",
"334289360394793102250647988483952640525",
"131685691012548450986807167116442286135",
"208372630877118939541514976551339443469",
"340079726408244108903539616093789111875",
"163027501810018732047176977068536372985",
"203293906388650042937965339040793502144",
"222730213852609048167808084116786041013",
"193757000735894271002824071313854998935",
"146133166602735154029354390596097865921",
"123340329066391264774193280050208863020",
"97477486829626414268000411655559140260",
"43706867515581433992862507778325464584",
"263946375394076876295090603438344734405"
]
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6018971710fdc7739f8655c1540832b4bb903671",
"target": {
"file": "fs/smb/client/cifsfs.c"
},
"id": "CVE-2024-42307-dfb9d5c1",
"signature_type": "Line",
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"181565232978814585872632120044746034109",
"151893783942539028942915456611437037007",
"228365380169201708761270589582674093496",
"247072749202489163069443021914431621170",
"334289360394793102250647988483952640525",
"23826475980615322697476034985909513798",
"1766446135039008449281196298260708180",
"182110142763536309092557263309722060676",
"289477144313557318600807891758063081368",
"212055771980784278360903296573860259330",
"222730213852609048167808084116786041013",
"193757000735894271002824071313854998935",
"146133166602735154029354390596097865921",
"123340329066391264774193280050208863020",
"97477486829626414268000411655559140260",
"43706867515581433992862507778325464584",
"263946375394076876295090603438344734405"
]
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@193cc89ea0ca1da311877d2b4bb5e9f03bcc82a2",
"target": {
"function": "init_cifs",
"file": "fs/smb/client/cifsfs.c"
},
"id": "CVE-2024-42307-eecbf720",
"signature_type": "Function",
"signature_version": "v1",
"digest": {
"function_hash": "53976690338882747234772070321518472530",
"length": 4048.0
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@193cc89ea0ca1da311877d2b4bb5e9f03bcc82a2",
"target": {
"file": "fs/smb/client/cifsfs.c"
},
"id": "CVE-2024-42307-f4d3bada",
"signature_type": "Line",
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"181565232978814585872632120044746034109",
"151893783942539028942915456611437037007",
"228365380169201708761270589582674093496",
"247072749202489163069443021914431621170",
"334289360394793102250647988483952640525",
"131685691012548450986807167116442286135",
"208372630877118939541514976551339443469",
"340079726408244108903539616093789111875",
"163027501810018732047176977068536372985",
"203293906388650042937965339040793502144",
"222730213852609048167808084116786041013",
"193757000735894271002824071313854998935",
"146133166602735154029354390596097865921",
"123340329066391264774193280050208863020",
"97477486829626414268000411655559140260",
"43706867515581433992862507778325464584",
"263946375394076876295090603438344734405"
]
},
"deprecated": false
}
]