CVE-2026-45887 PUBLISHED

af_unix: Fix memleak of newsk in unix_stream_connect().

Assigner: Linux
Reserved: 13.05.2026 Published: 27.05.2026 Updated: 27.05.2026

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().

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from fd0a109a0f6b7524543d17520da92a44a9f5343c to 365996a2b14d07caa9e33d367b67ea26c09d89b4 (excl.)
  • affected from fd0a109a0f6b7524543d17520da92a44a9f5343c to a5d95d7caba0160fb7b2b8d2bd96d5a1be861d9f (excl.)
  • affected from fd0a109a0f6b7524543d17520da92a44a9f5343c to 6884028cd7f275f8bcb854a347265cb1fb0e4bea (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 6.16 is affected
  • unaffected from 0 to 6.16 (excl.)
  • unaffected from 6.18.14 to 6.18.* (incl.)
  • unaffected from 6.19.4 to 6.19.* (incl.)
  • unaffected from 7.0 to * (incl.)

References