# CVE-2024-42307: cifs: fix potential null pointer use in destroy_workqueue in init_cifs error path

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2024-08-17T09:09:12.613Z
- Modified: 2026-06-17T07:49:13.690Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

cifs: fix potential null pointer use in destroy_workqueue in init_cifs error path

Dan Carpenter reported a Smack static checker warning:
   fs/smb/client/cifsfs.c:1981 init_cifs()
   error: we previously assumed 'serverclose_wq' 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 8c99dfb49bdc17edffc7ff3d46b400c8c291686c before 6018971710fdc7739f8655c1540832b4bb903671; from 6f17163b9339fac92023a1d9bef22128db3b9a4b before 160235efb4f9b55212dedff5de0094c606c4b303; from 173217bd73365867378b5e75a86f0049e1069ee8 before 3739d711246d8fbc95ff73dbdace9741cdce4777; from 173217bd73365867378b5e75a86f0049e1069ee8 before 193cc89ea0ca1da311877d2b4bb5e9f03bcc82a2; 40a5d14c9d3b585d55d3209fb5efe202dcaac926; from 6.1.85 before 6.1.103; from 6.6.26 before 6.6.44; from 6.8.5 before 6.9; 6.9 (not affected: before 6.9; from 6.1.103 up to 6.1.*; from 6.6.44 up to 6.6.*; from 6.10.3 up to 6.10.*; from 6.11 up to *)
- linux linux_kernel: from 6.1.85 before 6.1.103; from 6.6.26 before 6.6.44; from 6.8.5 before 6.10.3

## References

- <https://git.kernel.org/stable/c/6018971710fdc7739f8655c1540832b4bb903671> (patch)
- <https://git.kernel.org/stable/c/160235efb4f9b55212dedff5de0094c606c4b303> (patch)
- <https://git.kernel.org/stable/c/3739d711246d8fbc95ff73dbdace9741cdce4777> (patch)
- <https://git.kernel.org/stable/c/193cc89ea0ca1da311877d2b4bb5e9f03bcc82a2> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Sources

- CVE List: [CVE-2024-42307](https://www.cve.org/CVERecord?id=CVE-2024-42307), CVE Terms of Use, modified 2026-05-23
- NVD: [CVE-2024-42307](https://nvd.nist.gov/vuln/detail/CVE-2024-42307), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-42307 · Whole record: https://cve.day/CVE-2024-42307.json · Rebuilt by cve.day 2026-11-25T22:58:44.478Z
