製品・ソフトウェアに関する情報
LinuxカーネルのAF_UNIXソケットのガベージコレクタの競合状態により不完全な接続処理が発生し、インフライトカウントが不適切になる脆弱性
Title LinuxカーネルのAF_UNIXソケットのガベージコレクタの競合状態により不完全な接続処理が発生し、インフライトカウントが不適切になる脆弱性
Summary

Linuxカーネルには、AF_UNIXソケットのガベージコレクタに関する競合状態の脆弱性が存在していました。この問題は、ガベージコレクション処理中にまだ完全に接続されていないソケット(エンブリオ)がキューに追加される状況が考慮されていなかったことに起因します。その結果、SCM_RIGHTSを持つピアに接続している場合、不適切なインフライトカウントの増加やダングリングポインタが発生するおそれがありました。修正では、リスニングソケットをロックおよびアンロックすることで、connect()操作が完了するまでガベージコレクションが待機するようになり、これらの問題が解決されています。

Possible impacts 当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 また、当該ソフトウェアが扱う情報について、書き換えは発生しません。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
Solution

正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

Publication Date April 25, 2024, midnight
Registration Date Dec. 25, 2025, 5:01 p.m.
Last Update Dec. 25, 2025, 5:01 p.m.
CVSS3.0 : 警告
Score 4.7
Vector CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Affected System
Debian
Debian GNU/Linux 10.0
Linux
Linux Kernel 2.6.23 から 4.19.314 未満
Linux Kernel 4.20 から 5.4.275 未満
Linux Kernel 5.11 から 5.15.156 未満
Linux Kernel 5.16 から 6.1.87 未満
Linux Kernel 5.5 から 5.10.216 未満
Linux Kernel 6.2 から 6.6.28 未満
Linux Kernel 6.7 から 6.8.7 未満
Linux Kernel 6.9
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
Change Log
No Changed Details Date of change
1 [2025年12月25日]
  掲載
Dec. 25, 2025, 5:01 p.m.

NVD Vulnerability Information
CVE-2024-26923
Summary

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

af_unix: Fix garbage collector racing against connect()

Garbage collector does not take into account the risk of embryo getting
enqueued during the garbage collection. If such embryo has a peer that
carries SCM_RIGHTS, two consecutive passes of scan_children() may see a
different set of children. Leading to an incorrectly elevated inflight
count, and then a dangling pointer within the gc_inflight_list.

sockets are AF_UNIX/SOCK_STREAM
S is an unconnected socket
L is a listening in-flight socket bound to addr, not in fdtable
V's fd will be passed via sendmsg(), gets inflight count bumped

connect(S, addr) sendmsg(S, [V]); close(V) __unix_gc()
---------------- ------------------------- -----------

NS = unix_create1()
skb1 = sock_wmalloc(NS)
L = unix_find_other(addr)
unix_state_lock(L)
unix_peer(S) = NS
// V count=1 inflight=0

NS = unix_peer(S)
skb2 = sock_alloc()
skb_queue_tail(NS, skb2[V])

// V became in-flight
// V count=2 inflight=1

close(V)

// V count=1 inflight=1
// GC candidate condition met

for u in gc_inflight_list:
if (total_refs == inflight_refs)
add u to gc_candidates

// gc_candidates={L, V}

for u in gc_candidates:
scan_children(u, dec_inflight)

// embryo (skb1) was not
// reachable from L yet, so V's
// inflight remains unchanged
__skb_queue_tail(L, skb1)
unix_state_unlock(L)
for u in gc_candidates:
if (u.inflight)
scan_children(u, inc_inflight_move_tail)

// V count=1 inflight=2 (!)

If there is a GC-candidate listening socket, lock/unlock its state. This
makes GC wait until the end of any ongoing connect() to that socket. After
flipping the lock, a possibly SCM-laden embryo is already enqueued. And if
there is another embryo coming, it can not possibly carry SCM_RIGHTS. At
this point, unix_inflight() can not happen because unix_gc_lock is already
taken. Inflight graph remains unaffected.

Publication Date April 25, 2024, 3:15 p.m.
Registration Date April 25, 2024, 8 p.m.
Last Update Nov. 21, 2024, 6:03 p.m.
Related information, measures and tools
Common Vulnerabilities List