# CVE-2024-50152: smb: client: fix possible double free in smb2_set_ea()

- Severity: Critical 9.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/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.81%, higher than 54% of CVEs (2026-11-30)
- Published: 2024-11-07T09:31:28.733Z
- Modified: 2026-08-05T11:42:06.009Z
- Weaknesses: CWE-415
- Assigned by: Linux

## Description

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

smb: client: fix possible double free in smb2_set_ea()

Clang static checker(scan-build) warning：
fs/smb/client/smb2ops.c:1304:2: Attempt to free released memory.
 1304 |         kfree(ea);
      |         ^~~~~~~~~

There is a double free in such case:
'ea is initialized to NULL' -> 'first successful memory allocation for
ea' -> 'something failed, goto sea_exit' -> 'first memory release for ea'
-> 'goto replay_again' -> 'second goto sea_exit before allocate memory
for ea' -> 'second memory release for ea resulted in double free'.

Re-initialie 'ea' to NULL near to the replay_again label, it can fix this
double free problem.

(As written by CVE List.)

## Affected

- Linux Linux: from 433042a91f9373241307725b52de573933ffedbf before b1813c220b76f60b1727984794377c4aa849d4c1; from 4f1fffa2376922f3d1d506e49c0fd445b023a28e before c9f758ecf2562dfdd4adf12c22921b5de8366123; from 4f1fffa2376922f3d1d506e49c0fd445b023a28e before 19ebc1e6cab334a8193398d4152deb76019b5d34; from 6.6.32 before 6.6.59; 6.8 (not affected: before 6.8; from 6.6.59 up to 6.6.*; from 6.11.6 up to 6.11.*; from 6.12 up to *)
- linux linux_kernel: from 6.6.32 before 6.6.59; from 6.8 before 6.11.6; 6.12

## Every score

- Linux: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/b1813c220b76f60b1727984794377c4aa849d4c1> (patch)
- <https://git.kernel.org/stable/c/c9f758ecf2562dfdd4adf12c22921b5de8366123> (patch)
- <https://git.kernel.org/stable/c/19ebc1e6cab334a8193398d4152deb76019b5d34> (patch)

## Sources

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

---

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