# CVE-2026-45887: af_unix: Fix memleak of newsk in unix_stream_connect().

- 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.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2026-05-27T12:16:58.720Z
- Modified: 2026-06-25T21:13:24.180Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

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

af_unix: Fix memleak of newsk in unix_stream_connect().

When prepare_peercred() fails in unix_stream_connect(),
unix_release_sock() is not called for newsk, and the memory
is leaked.

Let's move prepare_peercred() before unix_create1().

(As written by CVE List.)

## Affected

- Linux Linux: from fd0a109a0f6b7524543d17520da92a44a9f5343c before 365996a2b14d07caa9e33d367b67ea26c09d89b4; from fd0a109a0f6b7524543d17520da92a44a9f5343c before a5d95d7caba0160fb7b2b8d2bd96d5a1be861d9f; from fd0a109a0f6b7524543d17520da92a44a9f5343c before 6884028cd7f275f8bcb854a347265cb1fb0e4bea; 6.16 (not affected: before 6.16; from 6.18.14 up to 6.18.*; from 6.19.4 up to 6.19.*; from 7.0 up to *)
- linux linux_kernel: from 6.16 before 6.18.14; from 6.19 before 6.19.4

## References

- <https://git.kernel.org/stable/c/365996a2b14d07caa9e33d367b67ea26c09d89b4> (patch)
- <https://git.kernel.org/stable/c/a5d95d7caba0160fb7b2b8d2bd96d5a1be861d9f> (patch)
- <https://git.kernel.org/stable/c/6884028cd7f275f8bcb854a347265cb1fb0e4bea> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2026-45887 · Whole record: https://cve.day/CVE-2026-45887.json · Rebuilt by cve.day 2026-11-25T22:59:22.490Z
