Skip to content
Heist/ feed
Back to feed
UnratedFix available

af_unix: Fix data-race around unix_tot_inflight.

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: af_unix: Fix data-race around unix_tot_inflight. unix_tot_inflight is changed under spin_lock(unix_gc_lock), but unix_release_sock() reads it locklessly. Let's use READ_ONCE() for unix_tot_inflight. Note that the writer side was marked by commit 9d6d7f1cb67c ("af_unix: annote lockless accesses to unix_tot_inflight & gc_in_progress") BUG: KCSAN: data-race in unix_inflight / unix_release_sock write (marked) to 0xffffffff871852b8 of 4 bytes by task 123 on cpu 1: unix_inflight+0x130/0x180 net/unix/scm.c:64 unix_attach_fds+0x137/0x1b0 net/unix/scm.c:123 unix_scm_to_skb net/unix/af_unix.c:1832 [inline] unix_dgram_sendmsg+0x46a/0x14f0 net/unix/af_unix.c:1955 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0x148/0x160 net/socket.c:747 ____sys_sendmsg+0x4e4/0x610 net/socket.c:2493 ___sys_sendmsg+0xc6/0x140 net/socket.c:2547 __sys_sendmsg+0x94/0x140 net/socket.c:2576 __do_sys_sendmsg net/socket.c:2585 [inline] __se_sys_sendmsg net/socket.c:2583 [inline] __x64_sys_sendmsg+0x45/0x50 net/socket.c:2583 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc read to 0xffffffff871852b8 of 4 bytes by task 4891 on cpu 0: unix_release_sock+0x608/0x910 net/unix/af_unix.c:671 unix_release+0x59/0x80 net/unix/af_unix.c:1058 __sock_release+0x7d/0x170 net/socket.c:653 sock_close+0x19/0x30 net/socket.c:1385 __fput+0x179/0x5e0 fs/file_table

Products
Kernel
Affected versions
Not specified
Fixed versions
4.14.326, 4.19.295, 5.10.195, 5.15.132, 5.4.257, 6.1.54, 6.5.4
CVEs
CVE-2023-54006
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 18:55 UTC · Revision 1

Source evidence

af_unix: Fix data-race around unix_tot_inflight.

core-osv · Original source

Published 24 Dec 2025, 10:55 UTC

In the Linux kernel, the following vulnerability has been resolved: af_unix: Fix data-race around unix_tot_inflight. unix_tot_inflight is changed under spin_lock(unix_gc_lock), but unix_release_sock() reads it locklessly. Let's use READ_ONCE() for unix_tot_inflight. Note that the writer side was marked by commit 9d6d7f1cb67c ("af_unix: annote lockless accesses to unix_tot_inflight & gc_in_progress") BUG: KCSAN: data-race in unix_inflight / unix_release_sock write (marked) to 0xffffffff871852b8 of 4 bytes by task 123 on cpu 1: unix_inflight+0x130/0x180 net/unix/scm.c:64 unix_attach_fds+0x137/0x1b0 net/unix/scm.c:123 unix_scm_to_skb net/unix/af_unix.c:1832 [inline] unix_dgram_sendmsg+0x46a/0x14f0 net/unix/af_unix.c:1955 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0x148/0x160 net/socket.c:747 ____sys_sendmsg+0x4e4/0x610 net/socket.c:2493 ___sys_sendmsg+0xc6/0x140 net/socket.c:2547 __sys_sendmsg+0x94/0x140 net/socket.c:2576 __do_sys_sendmsg net/socket.c:2585 [inline] __se_sys_sendmsg net/socket.c:2583 [inline] __x64_sys_sendmsg+0x45/0x50 net/socket.c:2583 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc read to 0xffffffff871852b8 of 4 bytes by task 4891 on cpu 0: unix_release_sock+0x608/0x910 net/unix/af_unix.c:671 unix_release+0x59/0x80 net/unix/af_unix.c:1058 __sock_release+0x7d/0x170 net/socket.c:653 sock_close+0x19/0x30 net/socket.c:1385 __fput+0x179/0x5e0 fs/file_table

osv:CVE-2023-54006

Kernel

Fixed versions: 4.14.326, 4.19.295, 5.4.257, 5.10.195, 5.15.132, 6.1.54, 6.5.4

Complete source record
{
  "id": "f65880c3befb91a58f5f3b1c9f99f89d00dea05f276cf32b7a3ae32e7244cb31",
  "url": "https://osv.dev/vulnerability/CVE-2023-54006",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "af_unix: Fix data-race around unix_tot_inflight.",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: af_unix: Fix data-race around unix_tot_inflight. unix_tot_inflight is changed under spin_lock(unix_gc_lock), but unix_release_sock() reads it locklessly. Let's use READ_ONCE() for unix_tot_inflight. Note that the writer side was marked by commit 9d6d7f1cb67c (\"af_unix: annote lockless accesses to unix_tot_inflight & gc_in_progress\") BUG: KCSAN: data-race in unix_inflight / unix_release_sock write (marked) to 0xffffffff871852b8 of 4 bytes by task 123 on cpu 1: unix_inflight+0x130/0x180 net/unix/scm.c:64 unix_attach_fds+0x137/0x1b0 net/unix/scm.c:123 unix_scm_to_skb net/unix/af_unix.c:1832 [inline] unix_dgram_sendmsg+0x46a/0x14f0 net/unix/af_unix.c:1955 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0x148/0x160 net/socket.c:747 ____sys_sendmsg+0x4e4/0x610 net/socket.c:2493 ___sys_sendmsg+0xc6/0x140 net/socket.c:2547 __sys_sendmsg+0x94/0x140 net/socket.c:2576 __do_sys_sendmsg net/socket.c:2585 [inline] __se_sys_sendmsg net/socket.c:2583 [inline] __x64_sys_sendmsg+0x45/0x50 net/socket.c:2583 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc read to 0xffffffff871852b8 of 4 bytes by task 4891 on cpu 0: unix_release_sock+0x608/0x910 net/unix/af_unix.c:671 unix_release+0x59/0x80 net/unix/af_unix.c:1058 __sock_release+0x7d/0x170 net/socket.c:653 sock_close+0x19/0x30 net/socket.c:1385 __fput+0x179/0x5e0 fs/file_table",
    "evidence": "osv:CVE-2023-54006",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.326",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "4.19.295",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.257",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.195",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.132",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.54",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.5.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2023-54006",
      "aliases": [
        "CVE-2023-54006"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "9305cfa4443dbfb99faf35c5603ec0c0e91b5ef8"
                },
                {
                  "fixed": "31b46d5e7c4e295bd112960614a66a177a057dca"
                },
                {
                  "fixed": "20aa8325464d8905450089eed96ca102a074d853"
                },
                {
                  "fixed": "5d91b7891f4a9a9d69d75e9f44ab4bf1f3b11840"
                },
                {
                  "fixed": "cf29b42766ad4af2ae6a449f583796951551b48d"
                },
                {
                  "fixed": "e5edc6e44a882c0458878ab10eaddfe60ac34e57"
                },
                {
                  "fixed": "2d8933ca863e252fb09ad0be483255e3dfeb1f54"
                },
                {
                  "fixed": "afc284a4a781defbb12b2a40427fae34c3d20e17"
                },
                {
                  "fixed": "ade32bd8a738d7497ffe9743c46728db26740f78"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54006.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.6.24"
                },
                {
                  "fixed": "4.14.326"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.15.0"
                },
                {
                  "fixed": "4.19.295"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.257"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.195"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.132"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.54"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.5.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54006.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:22.529208041Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/20aa8325464d8905450089eed96ca102a074d853",
        "https://git.kernel.org/stable/c/2d8933ca863e252fb09ad0be483255e3dfeb1f54",
        "https://git.kernel.org/stable/c/31b46d5e7c4e295bd112960614a66a177a057dca",
        "https://git.kernel.org/stable/c/5d91b7891f4a9a9d69d75e9f44ab4bf1f3b11840",
        "https://git.kernel.org/stable/c/ade32bd8a738d7497ffe9743c46728db26740f78",
        "https://git.kernel.org/stable/c/afc284a4a781defbb12b2a40427fae34c3d20e17",
        "https://git.kernel.org/stable/c/cf29b42766ad4af2ae6a449f583796951551b48d",
        "https://git.kernel.org/stable/c/e5edc6e44a882c0458878ab10eaddfe60ac34e57",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54006.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-54006",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54006.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-54006",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 488861,
  "published_at": "2025-12-24T10:55:40.534+00:00"
}