Skip to content
Heist/ feed
Back to feed
HighFix available

tipc: Fix use-after-free of kernel socket in cleanup_bearer().

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: tipc: Fix use-after-free of kernel socket in cleanup_bearer(). syzkaller reported a use-after-free of UDP kernel socket in cleanup_bearer() without repro. [0][1] When bearer_disable() calls tipc_udp_disable(), cleanup of the UDP kernel socket is deferred by work calling cleanup_bearer(). tipc_exit_net() waits for such works to finish by checking tipc_net(net)->wq_count. However, the work decrements the count too early before releasing the kernel socket, unblocking cleanup_net() and resulting in use-after-free. Let's move the decrement after releasing the socket in cleanup_bearer(). [0]: ref_tracker: net notrefcnt@000000009b3d1faf has 1/1 users at sk_alloc+0x438/0x608 inet_create+0x4c8/0xcb0 __sock_create+0x350/0x6b8 sock_create_kern+0x58/0x78 udp_sock_create4+0x68/0x398 udp_sock_create+0x88/0xc8 tipc_udp_enable+0x5e8/0x848 __tipc_nl_bearer_enable+0x84c/0xed8 tipc_nl_bearer_enable+0x38/0x60 genl_family_rcv_msg_doit+0x170/0x248 genl_rcv_msg+0x400/0x5b0 netlink_rcv_skb+0x1dc/0x398 genl_rcv+0x44/0x68 netlink_unicast+0x678/0x8b0 netlink_sendmsg+0x5e4/0x898 ____sys_sendmsg+0x500/0x830 [1]: BUG: KMSAN: use-after-free in udp_hashslot include/net/udp.h:85 [inline] BUG: KMSAN: use-after-free in udp_lib_unhash+0x3b8/0x930 net/ipv4/udp.c:1979 udp_hashslot include/net/udp.h:85 [inline] udp_lib_unhash+0x3b8/0x930 net/ipv4/udp.c:1979 sk_common_release+0xaf/0x3f0 net/core/sock.c:3820 inet_release+0x1e0/0x260 net/ipv4/af_inet

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.231, 5.15.174, 5.4.287, 6.1.120, 6.12.5, 6.6.66
CVEs
CVE-2024-56642
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 00:52 UTC · Revision 1

Source evidence

tipc: Fix use-after-free of kernel socket in cleanup_bearer().

core-osv · Original source

Published 27 Dec 2024, 15:02 UTC

In the Linux kernel, the following vulnerability has been resolved: tipc: Fix use-after-free of kernel socket in cleanup_bearer(). syzkaller reported a use-after-free of UDP kernel socket in cleanup_bearer() without repro. [0][1] When bearer_disable() calls tipc_udp_disable(), cleanup of the UDP kernel socket is deferred by work calling cleanup_bearer(). tipc_exit_net() waits for such works to finish by checking tipc_net(net)->wq_count. However, the work decrements the count too early before releasing the kernel socket, unblocking cleanup_net() and resulting in use-after-free. Let's move the decrement after releasing the socket in cleanup_bearer(). [0]: ref_tracker: net notrefcnt@000000009b3d1faf has 1/1 users at sk_alloc+0x438/0x608 inet_create+0x4c8/0xcb0 __sock_create+0x350/0x6b8 sock_create_kern+0x58/0x78 udp_sock_create4+0x68/0x398 udp_sock_create+0x88/0xc8 tipc_udp_enable+0x5e8/0x848 __tipc_nl_bearer_enable+0x84c/0xed8 tipc_nl_bearer_enable+0x38/0x60 genl_family_rcv_msg_doit+0x170/0x248 genl_rcv_msg+0x400/0x5b0 netlink_rcv_skb+0x1dc/0x398 genl_rcv+0x44/0x68 netlink_unicast+0x678/0x8b0 netlink_sendmsg+0x5e4/0x898 ____sys_sendmsg+0x500/0x830 [1]: BUG: KMSAN: use-after-free in udp_hashslot include/net/udp.h:85 [inline] BUG: KMSAN: use-after-free in udp_lib_unhash+0x3b8/0x930 net/ipv4/udp.c:1979 udp_hashslot include/net/udp.h:85 [inline] udp_lib_unhash+0x3b8/0x930 net/ipv4/udp.c:1979 sk_common_release+0xaf/0x3f0 net/core/sock.c:3820 inet_release+0x1e0/0x260 net/ipv4/af_inet

osv:CVE-2024-56642

Kernel

Fixed versions: 5.4.287, 5.10.231, 5.15.174, 6.1.120, 6.6.66, 6.12.5

Complete source record
{
  "id": "264541d259a902fc05e9786c575811b2890ad24cb0996ea8e389a6c937f22d3e",
  "url": "https://osv.dev/vulnerability/CVE-2024-56642",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "tipc: Fix use-after-free of kernel socket in cleanup_bearer().",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: tipc: Fix use-after-free of kernel socket in cleanup_bearer(). syzkaller reported a use-after-free of UDP kernel socket in cleanup_bearer() without repro. [0][1] When bearer_disable() calls tipc_udp_disable(), cleanup of the UDP kernel socket is deferred by work calling cleanup_bearer(). tipc_exit_net() waits for such works to finish by checking tipc_net(net)->wq_count. However, the work decrements the count too early before releasing the kernel socket, unblocking cleanup_net() and resulting in use-after-free. Let's move the decrement after releasing the socket in cleanup_bearer(). [0]: ref_tracker: net notrefcnt@000000009b3d1faf has 1/1 users at sk_alloc+0x438/0x608 inet_create+0x4c8/0xcb0 __sock_create+0x350/0x6b8 sock_create_kern+0x58/0x78 udp_sock_create4+0x68/0x398 udp_sock_create+0x88/0xc8 tipc_udp_enable+0x5e8/0x848 __tipc_nl_bearer_enable+0x84c/0xed8 tipc_nl_bearer_enable+0x38/0x60 genl_family_rcv_msg_doit+0x170/0x248 genl_rcv_msg+0x400/0x5b0 netlink_rcv_skb+0x1dc/0x398 genl_rcv+0x44/0x68 netlink_unicast+0x678/0x8b0 netlink_sendmsg+0x5e4/0x898 ____sys_sendmsg+0x500/0x830 [1]: BUG: KMSAN: use-after-free in udp_hashslot include/net/udp.h:85 [inline] BUG: KMSAN: use-after-free in udp_lib_unhash+0x3b8/0x930 net/ipv4/udp.c:1979 udp_hashslot include/net/udp.h:85 [inline] udp_lib_unhash+0x3b8/0x930 net/ipv4/udp.c:1979 sk_common_release+0xaf/0x3f0 net/core/sock.c:3820 inet_release+0x1e0/0x260 net/ipv4/af_inet",
    "evidence": "osv:CVE-2024-56642",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.4.287",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.231",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.174",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.120",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.66",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.5",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-56642",
      "aliases": [
        "CVE-2024-56642"
      ],
      "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": "d1f76dfadaf8f47ed1753f97dbcbd41c16215ffa"
                },
                {
                  "fixed": "4e69457f9dfae67435f3ccf29008768eae860415"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5195ec5e365a2a9331bfeb585b613a6e94f98dba"
                },
                {
                  "fixed": "650ee9a22d7a2de8999fac2d45983597a0c22359"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "04c26faa51d1e2fe71cf13c45791f5174c37f986"
                },
                {
                  "fixed": "d2a4894f238551eae178904e7f45af87577074fd"
                },
                {
                  "fixed": "d62d5180c036eeac09f80660edc7a602b369125f"
                },
                {
                  "fixed": "d00d4470bf8c4282617a3a10e76b20a9c7e4cffa"
                },
                {
                  "fixed": "e48b211c4c59062cb6dd6c2c37c51a7cc235a464"
                },
                {
                  "fixed": "6a2fa13312e51a621f652d522d7e2df7066330b6"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.4.124"
                },
                {
                  "fixed": "5.4.287"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.10.42"
                },
                {
                  "fixed": "5.10.231"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.12.9"
                },
                {
                  "fixed": "5.13"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "b9f5b7ad4ac3af006443f535b1ce7bff1d130d7d"
                }
              ]
            }
          ],
          "versions": [
            "v5.4.286",
            "v5.4.285",
            "v5.4.284",
            "v5.4.283",
            "v5.4.282",
            "v5.4.281",
            "v5.4.280",
            "v5.4.279",
            "v5.4.278",
            "v5.4.277",
            "v5.4.276",
            "v5.4.275",
            "v5.4.274",
            "v5.4.273",
            "v5.4.272",
            "v5.4.271",
            "v5.4.270",
            "v5.4.269",
            "v5.4.268",
            "v5.4.267",
            "v5.4.266",
            "v5.4.265",
            "v5.4.264",
            "v5.4.263",
            "v5.4.262",
            "v5.4.261",
            "v5.4.260",
            "v5.4.259",
            "v5.4.258",
            "v5.4.257",
            "v5.4.256",
            "v5.4.255",
            "v5.4.254",
            "v5.4.253",
            "v5.4.252",
            "v5.4.251",
            "v5.4.250",
            "v5.4.249",
            "v5.4.248",
            "v5.4.247",
            "v5.4.246",
            "v5.4.245",
            "v5.4.244",
            "v5.4.243",
            "v5.4.242",
            "v5.4.241",
            "v5.4.240",
            "v5.4.239",
            "v5.4.238",
            "v5.4.237",
            "v5.4.236",
            "v5.4.235",
            "v5.4.234",
            "v5.4.233",
            "v5.4.232",
            "v5.4.231",
            "v5.4.230",
            "v5.4.229",
            "v5.4.228",
            "v5.4.227",
            "v5.4.226",
            "v5.4.225",
            "v5.4.224",
            "v5.4.223",
            "v5.4.222",
            "v5.4.221",
            "v5.4.220",
            "v5.4.219",
            "v5.4.218",
            "v5.4.217",
            "v5.4.216",
            "v5.4.215",
            "v5.4.214",
            "v5.4.213",
            "v5.4.212",
            "v5.4.211",
            "v5.4.210",
            "v5.4.209",
            "v5.4.208",
            "v5.4.207",
            "v5.4.206",
            "v5.4.205",
            "v5.4.204",
            "v5.4.203",
            "v5.4.202",
            "v5.4.201",
            "v5.4.200",
            "v5.4.199",
            "v5.4.198",
            "v5.4.197",
            "v5.4.196",
            "v5.4.195",
            "v5.4.194",
            "v5.4.193",
            "v5.4.192",
            "v5.4.191",
            "v5.4.190",
            "v5.4.189",
            "v5.4.188",
            "v5.4.187",
            "v5.4.186",
            "v5.4.185",
            "v5.4.184",
            "v5.4.183",
            "v5.4.182",
            "v5.4.181",
            "v5.4.180",
            "v5.4.179",
            "v5.4.178",
            "v5.4.177",
            "v5.4.176",
            "v5.4.175",
            "v5.4.174",
            "v5.4.173",
            "v5.4.172",
            "v5.4.171",
            "v5.4.170",
            "v5.4.169",
            "v5.4.168",
            "v5.4.167",
            "v5.4.166",
            "v5.4.165",
            "v5.4.164",
            "v5.4.163",
            "v5.4.162",
            "v5.4.161",
            "v5.4.160",
            "v5.4.159",
            "v5.4.158",
            "v5.4.157",
            "v5.4.156",
            "v5.4.155",
            "v5.4.154",
            "v5.4.153",
            "v5.4.152",
            "v5.4.151",
            "v5.4.150",
            "v5.4.149",
            "v5.4.148",
            "v5.4.147",
            "v5.4.146",
            "v5.4.145",
            "v5.4.144",
            "v5.4.143",
            "v5.4.142",
            "v5.4.141",
            "v5.4.140",
            "v5.4.139",
            "v5.4.138",
            "v5.4.137",
            "v5.4.136",
            "v5.4.135",
            "v5.4.134",
            "v5.4.133",
            "v5.4.132",
            "v5.4.131",
            "v5.4.130",
            "v5.4.129",
            "v5.4.128",
            "v5.4.127",
            "v5.4.126",
            "v5.4.125",
            "v5.4.124",
            "v5.10.230",
            "v5.10.229",
            "v5.10.228",
            "v5.10.227",
            "v5.10.226",
            "v5.10.225",
            "v5.10.224",
            "v5.10.223",
            "v5.10.222",
            "v5.10.221",
            "v5.10.220",
            "v5.10.219",
            "v5.10.218",
            "v5.10.217",
            "v5.10.216",
            "v5.10.215",
            "v5.10.214",
            "v5.10.213",
            "v5.10.212",
            "v5.10.211",
            "v5.10.210",
            "v5.10.209",
            "v5.10.208",
            "v5.10.207",
            "v5.10.206",
            "v5.10.205",
            "v5.10.204",
            "v5.10.203",
            "v5.10.202",
            "v5.10.201",
            "v5.10.200",
            "v5.10.199",
            "v5.10.198",
            "v5.10.197",
            "v5.10.196",
            "v5.10.195",
            "v5.10.194",
            "v5.10.193",
            "v5.10.192",
            "v5.10.191",
            "v5.10.190",
            "v5.10.189",
            "v5.10.188",
            "v5.10.187",
            "v5.10.186",
            "v5.10.185",
            "v5.10.184",
            "v5.10.183",
            "v5.10.182",
            "v5.10.181",
            "v5.10.180",
            "v5.10.179",
            "v5.10.178",
            "v5.10.177",
            "v5.10.176",
            "v5.10.175",
            "v5.10.174",
            "v5.10.173",
            "v5.10.172",
            "v5.10.171",
            "v5.10.170",
            "v5.10.169",
            "v5.10.168",
            "v5.10.167",
            "v5.10.166",
            "v5.10.165",
            "v5.10.164",
            "v5.10.163",
            "v5.10.162",
            "v5.10.161",
            "v5.10.160",
            "v5.10.159",
            "v5.10.158",
            "v5.10.157",
            "v5.10.156",
            "v5.10.155",
            "v5.10.154",
            "v5.10.153",
            "v5.10.152",
            "v5.10.151",
            "v5.10.150",
            "v5.10.149",
            "v5.10.148",
            "v5.10.147",
            "v5.10.146",
            "v5.10.145",
            "v5.10.144",
            "v5.10.143",
            "v5.10.142",
            "v5.10.141",
            "v5.10.140",
            "v5.10.139",
            "v5.10.138",
            "v5.10.137",
            "v5.10.136",
            "v5.10.135",
            "v5.10.134",
            "v5.10.133",
            "v5.10.132",
            "v5.10.131",
            "v5.10.130",
            "v5.10.129",
            "v5.10.128",
            "v5.10.127",
            "v5.10.126",
            "v5.10.125",
            "v5.10.124",
            "v5.10.123",
            "v5.10.122",
            "v5.10.121",
            "v5.10.120",
            "v5.10.119",
            "v5.10.118",
            "v5.10.117",
            "v5.10.116",
            "v5.10.115",
            "v5.10.114",
            "v5.10.113",
            "v5.10.112",
            "v5.10.111",
            "v5.10.110",
            "v5.10.109",
            "v5.10.108",
            "v5.10.107",
            "v5.10.106",
            "v5.10.105",
            "v5.10.104",
            "v5.10.103",
            "v5.10.102",
            "v5.10.101",
            "v5.10.100",
            "v5.10.99",
            "v5.10.98",
            "v5.10.97",
            "v5.10.96",
            "v5.10.95",
            "v5.10.94",
            "v5.10.93",
            "v5.10.92",
            "v5.10.91",
            "v5.10.90",
            "v5.10.89",
            "v5.10.88",
            "v5.10.87",
            "v5.10.86",
            "v5.10.85",
            "v5.10.84",
            "v5.10.83",
            "v5.10.82",
            "v5.10.81",
            "v5.10.80",
            "v5.10.79",
            "v5.10.78",
            "v5.10.77",
            "v5.10.76",
            "v5.10.75",
            "v5.10.74",
            "v5.10.73",
            "v5.10.72",
            "v5.10.71",
            "v5.10.70",
            "v5.10.69",
            "v5.10.68",
            "v5.10.67",
            "v5.10.66",
            "v5.10.65",
            "v5.10.64",
            "v5.10.63",
            "v5.10.62",
            "v5.10.61",
            "v5.10.60",
            "v5.10.59",
            "v5.10.58",
            "v5.10.57",
            "v5.10.56",
            "v5.10.55",
            "v5.10.54",
            "v5.10.53",
            "v5.10.52",
            "v5.10.51",
            "v5.10.50",
            "v5.10.49",
            "v5.10.48",
            "v5.10.47",
            "v5.10.46",
            "v5.10.45",
            "v5.10.44",
            "v5.10.43",
            "v5.10.42",
            "v5.12.19",
            "v5.12.18",
            "v5.12.17",
            "v5.12.16",
            "v5.12.15",
            "v5.12.14",
            "v5.12.13",
            "v5.12.12",
            "v5.12.11",
            "v5.12.10",
            "v5.12.9"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-56642.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5.4.287"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.231"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.174"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.13.0"
                },
                {
                  "fixed": "6.1.120"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.6.66"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.12.5"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-56642.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:25.110739056Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/4e69457f9dfae67435f3ccf29008768eae860415",
        "https://git.kernel.org/stable/c/650ee9a22d7a2de8999fac2d45983597a0c22359",
        "https://git.kernel.org/stable/c/6a2fa13312e51a621f652d522d7e2df7066330b6",
        "https://git.kernel.org/stable/c/d00d4470bf8c4282617a3a10e76b20a9c7e4cffa",
        "https://git.kernel.org/stable/c/d2a4894f238551eae178904e7f45af87577074fd",
        "https://git.kernel.org/stable/c/d62d5180c036eeac09f80660edc7a602b369125f",
        "https://git.kernel.org/stable/c/e48b211c4c59062cb6dd6c2c37c51a7cc235a464",
        "https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html",
        "https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/56xxx/CVE-2024-56642.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-56642",
        "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/2024/56xxx/CVE-2024-56642.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-56642",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 491313,
  "published_at": "2024-12-27T15:02:43.66+00:00"
}