Skip to content
Heist/ feed
Back to feed
HighFix available

xsk: Fix race condition in AF_XDP generic RX path

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: xsk: Fix race condition in AF_XDP generic RX path Move rx_lock from xsk_socket to xsk_buff_pool. Fix synchronization for shared umem mode in generic RX path where multiple sockets share single xsk_buff_pool. RX queue is exclusive to xsk_socket, while FILL queue can be shared between multiple sockets. This could result in race condition where two CPU cores access RX path of two different sockets sharing the same umem. Protect both queues by acquiring spinlock in shared xsk_buff_pool. Lock contention may be minimized in the future by some per-thread FQ buffering. It's safe and necessary to move spin_lock_bh(rx_lock) after xsk_rcv_check(): * xs->pool and spinlock_init is synchronized by xsk_bind() -> xsk_is_bound() memory barriers. * xsk_rcv_check() may return true at the moment of xsk_release() or xsk_unbind_dev(), however this will not cause any data races or race conditions. xsk_unbind_dev() removes xdp socket from all maps and waits for completion of all outstanding rx operations. Packets in RX path will either complete safely or drop.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.164, 6.12.28, 6.14.6, 6.6.123
CVEs
CVE-2025-37920
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 02:58 UTC · Revision 1

Source evidence

xsk: Fix race condition in AF_XDP generic RX path

core-osv · Original source

Published 20 May 2025, 15:21 UTC

In the Linux kernel, the following vulnerability has been resolved: xsk: Fix race condition in AF_XDP generic RX path Move rx_lock from xsk_socket to xsk_buff_pool. Fix synchronization for shared umem mode in generic RX path where multiple sockets share single xsk_buff_pool. RX queue is exclusive to xsk_socket, while FILL queue can be shared between multiple sockets. This could result in race condition where two CPU cores access RX path of two different sockets sharing the same umem. Protect both queues by acquiring spinlock in shared xsk_buff_pool. Lock contention may be minimized in the future by some per-thread FQ buffering. It's safe and necessary to move spin_lock_bh(rx_lock) after xsk_rcv_check(): * xs->pool and spinlock_init is synchronized by xsk_bind() -> xsk_is_bound() memory barriers. * xsk_rcv_check() may return true at the moment of xsk_release() or xsk_unbind_dev(), however this will not cause any data races or race conditions. xsk_unbind_dev() removes xdp socket from all maps and waits for completion of all outstanding rx operations. Packets in RX path will either complete safely or drop.

osv:CVE-2025-37920

Kernel

Fixed versions: 6.1.164, 6.6.123, 6.12.28, 6.14.6

Complete source record
{
  "id": "f81ad8e5274f36d33441a8128f3b103caec28f55340332d01f8052040ea2ff23",
  "url": "https://osv.dev/vulnerability/CVE-2025-37920",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "xsk: Fix race condition in AF_XDP generic RX path",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: xsk: Fix race condition in AF_XDP generic RX path Move rx_lock from xsk_socket to xsk_buff_pool. Fix synchronization for shared umem mode in generic RX path where multiple sockets share single xsk_buff_pool. RX queue is exclusive to xsk_socket, while FILL queue can be shared between multiple sockets. This could result in race condition where two CPU cores access RX path of two different sockets sharing the same umem. Protect both queues by acquiring spinlock in shared xsk_buff_pool. Lock contention may be minimized in the future by some per-thread FQ buffering. It's safe and necessary to move spin_lock_bh(rx_lock) after xsk_rcv_check(): * xs->pool and spinlock_init is synchronized by xsk_bind() -> xsk_is_bound() memory barriers. * xsk_rcv_check() may return true at the moment of xsk_release() or xsk_unbind_dev(), however this will not cause any data races or race conditions. xsk_unbind_dev() removes xdp socket from all maps and waits for completion of all outstanding rx operations. Packets in RX path will either complete safely or drop.",
    "evidence": "osv:CVE-2025-37920",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.164",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.123",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.28",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.14.6",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-37920",
      "aliases": [
        "CVE-2025-37920"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "bf0bdd1343efbbf65b4d53aef1fce14acbd79d50"
                },
                {
                  "fixed": "975b372313dc018b9bd6cc0d85d188787054b19e"
                },
                {
                  "fixed": "b6978c565ce33658543c637060852434b4248d30"
                },
                {
                  "fixed": "65d3c570614b892257dc58a1b202908242ecf8fd"
                },
                {
                  "fixed": "75a240a3e8abf17b9e00b0ef0492b1bbaa932251"
                },
                {
                  "fixed": "a1356ac7749cafc4e27aa62c0c4604b5dca4983e"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.1.20"
                },
                {
                  "fixed": "5.2"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.2.3"
                },
                {
                  "fixed": "5.3"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "fd7c22ba7a0ad898b9ecf77dd53f5ccc48492e35"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "8a090e3b73eaffe18e08ccc3fb5abecf6b0a9781"
                }
              ]
            }
          ],
          "versions": [
            "v5.1.21",
            "v5.1.20",
            "v5.2.21",
            "v5.2.20",
            "v5.2.19",
            "v5.2.18",
            "v5.2.17",
            "v5.2.16",
            "v5.2.15",
            "v5.2.14",
            "v5.2.13",
            "v5.2.12",
            "v5.2.11",
            "v5.2.10",
            "v5.2.9",
            "v5.2.8",
            "v5.2.7",
            "v5.2.6",
            "v5.2.5",
            "v5.2.4",
            "v5.2.3"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-37920.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.3.0"
                },
                {
                  "fixed": "6.1.164"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.123"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.28"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.14.6"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-37920.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:53.543304848Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/65d3c570614b892257dc58a1b202908242ecf8fd",
        "https://git.kernel.org/stable/c/75a240a3e8abf17b9e00b0ef0492b1bbaa932251",
        "https://git.kernel.org/stable/c/975b372313dc018b9bd6cc0d85d188787054b19e",
        "https://git.kernel.org/stable/c/a1356ac7749cafc4e27aa62c0c4604b5dca4983e",
        "https://git.kernel.org/stable/c/b6978c565ce33658543c637060852434b4248d30",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37920.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-37920",
        "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/2025/37xxx/CVE-2025-37920.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-37920",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 522011,
  "published_at": "2025-05-20T15:21:49.685+00:00"
}