HomeDefectsLIN1025-6113
Fixed

LIN1025-6113 : Security Advisory - linux - CVE-2025-40214

Created: Dec 7, 2025    Updated: Jan 4, 2026
Resolved Date: Jan 4, 2026
Found In Version: 10.25.33.1
Fix Version: 10.25.33.5
Severity: Standard
Applicable for: Wind River Linux LTS 25
Component/s: Kernel

Description

In the Linux kernel, the following vulnerability has been resolved:[EOL][EOL]af_unix: Initialise scc_index in unix_add_edge().[EOL][EOL]Quang Le reported that the AF_UNIX GC could garbage-collect a[EOL]receive queue of an alive in-flight socket, with a nice repro.[EOL][EOL]The repro consists of three stages.[EOL][EOL]  1)[EOL]    1-a. Create a single cyclic reference with many sockets[EOL]    1-b. close() all sockets[EOL]    1-c. Trigger GC[EOL][EOL]  2)[EOL]    2-a. Pass sk-A to an embryo sk-B[EOL]    2-b. Pass sk-X to sk-X[EOL]    2-c. Trigger GC[EOL][EOL]  3)[EOL]    3-a. accept() the embryo sk-B[EOL]    3-b. Pass sk-B to sk-C[EOL]    3-c. close() the in-flight sk-A[EOL]    3-d. Trigger GC[EOL][EOL]As of 2-c, sk-A and sk-X are linked to unix_unvisited_vertices,[EOL]and unix_walk_scc() groups them into two different SCCs:[EOL][EOL]  unix_sk(sk-A)->vertex->scc_index = 2 (UNIX_VERTEX_INDEX_START)[EOL]  unix_sk(sk-X)->vertex->scc_index = 3[EOL][EOL]Once GC completes, unix_graph_grouped is set to true.[EOL]Also, unix_graph_maybe_cyclic is set to true due to sk-X's[EOL]cyclic self-reference, which makes close() trigger GC.[EOL][EOL]At 3-b, unix_add_edge() allocates unix_sk(sk-B)->vertex and[EOL]links it to unix_unvisited_vertices.[EOL][EOL]unix_update_graph() is called at 3-a. and 3-b., but neither[EOL]unix_graph_grouped nor unix_graph_maybe_cyclic is changed[EOL]because both sk-B's listener and sk-C are not in-flight.[EOL][EOL]3-c decrements sk-A's file refcnt to 1.[EOL][EOL]Since unix_graph_grouped is true at 3-d, unix_walk_scc_fast()[EOL]is finally called and iterates 3 sockets sk-A, sk-B, and sk-X:[EOL][EOL]  sk-A -> sk-B (-> sk-C)[EOL]  sk-X -> sk-X[EOL][EOL]This is totally fine.  All of them are not yet close()d and[EOL]should be grouped into different SCCs.[EOL][EOL]However, unix_vertex_dead() misjudges that sk-A and sk-B are[EOL]in the same SCC and sk-A is dead.[EOL][EOL]  unix_sk(sk-A)->scc_index == unix_sk(sk-B)->scc_index <-- Wrong![EOL]  &&[EOL]  sk-A's file refcnt == unix_sk(sk-A)->vertex->out_degree[EOL]                                       ^-- 1 in-flight count for sk-B[EOL]  -> sk-A is dead !?[EOL][EOL]The problem is that unix_add_edge() does not initialise scc_index.[EOL][EOL]Stage 1) is used for heap spraying, making a newly allocated[EOL]vertex have vertex->scc_index == 2 (UNIX_VERTEX_INDEX_START)[EOL]set by unix_walk_scc() at 1-c.[EOL][EOL]Let's track the max SCC index from the previous unix_walk_scc()[EOL]call and assign the max + 1 to a new vertex's scc_index.[EOL][EOL]This way, we can continue to avoid Tarjan's algorithm while[EOL]preventing misjudgments.

CVEs