{
  "threat_severity" : "Moderate",
  "public_date" : "2024-12-02T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: net: fix data-races around sk->sk_forward_alloc",
    "id" : "2329928",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2329928"
  },
  "cvss3" : {
    "cvss3_base_score" : "4.7",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-362",
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\nnet: fix data-races around sk->sk_forward_alloc\nSyzkaller reported this warning:\n------------[ cut here ]------------\nWARNING: CPU: 0 PID: 16 at net/ipv4/af_inet.c:156 inet_sock_destruct+0x1c5/0x1e0\nModules linked in:\nCPU: 0 UID: 0 PID: 16 Comm: ksoftirqd/0 Not tainted 6.12.0-rc5 #26\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014\nRIP: 0010:inet_sock_destruct+0x1c5/0x1e0\nCode: 24 12 4c 89 e2 5b 48 c7 c7 98 ec bb 82 41 5c e9 d1 18 17 ff 4c 89 e6 5b 48 c7 c7 d0 ec bb 82 41 5c e9 bf 18 17 ff 0f 0b eb 83 <0f> 0b eb 97 0f 0b eb 87 0f 0b e9 68 ff ff ff 66 66 2e 0f 1f 84 00\nRSP: 0018:ffffc9000008bd90 EFLAGS: 00010206\nRAX: 0000000000000300 RBX: ffff88810b172a90 RCX: 0000000000000007\nRDX: 0000000000000002 RSI: 0000000000000300 RDI: ffff88810b172a00\nRBP: ffff88810b172a00 R08: ffff888104273c00 R09: 0000000000100007\nR10: 0000000000020000 R11: 0000000000000006 R12: ffff88810b172a00\nR13: 0000000000000004 R14: 0000000000000000 R15: ffff888237c31f78\nFS:  0000000000000000(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000\nCS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\nCR2: 00007ffc63fecac8 CR3: 000000000342e000 CR4: 00000000000006f0\nDR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\nDR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\nCall Trace:\n<TASK>\n? __warn+0x88/0x130\n? inet_sock_destruct+0x1c5/0x1e0\n? report_bug+0x18e/0x1a0\n? handle_bug+0x53/0x90\n? exc_invalid_op+0x18/0x70\n? asm_exc_invalid_op+0x1a/0x20\n? inet_sock_destruct+0x1c5/0x1e0\n__sk_destruct+0x2a/0x200\nrcu_do_batch+0x1aa/0x530\n? rcu_do_batch+0x13b/0x530\nrcu_core+0x159/0x2f0\nhandle_softirqs+0xd3/0x2b0\n? __pfx_smpboot_thread_fn+0x10/0x10\nrun_ksoftirqd+0x25/0x30\nsmpboot_thread_fn+0xdd/0x1d0\nkthread+0xd3/0x100\n? __pfx_kthread+0x10/0x10\nret_from_fork+0x34/0x50\n? __pfx_kthread+0x10/0x10\nret_from_fork_asm+0x1a/0x30\n</TASK>\n---[ end trace 0000000000000000 ]---\nIts possible that two threads call tcp_v6_do_rcv()/sk_forward_alloc_add()\nconcurrently when sk->sk_state == TCP_LISTEN with sk->sk_lock unlocked,\nwhich triggers a data-race around sk->sk_forward_alloc:\ntcp_v6_rcv\ntcp_v6_do_rcv\nskb_clone_and_charge_r\nsk_rmem_schedule\n__sk_mem_schedule\nsk_forward_alloc_add()\nskb_set_owner_r\nsk_mem_charge\nsk_forward_alloc_add()\n__kfree_skb\nskb_release_all\nskb_release_head_state\nsock_rfree\nsk_mem_uncharge\nsk_forward_alloc_add()\nsk_mem_reclaim\n// set local var reclaimable\n__sk_mem_reclaim\nsk_forward_alloc_add()\nIn this syzkaller testcase, two threads call\ntcp_v6_do_rcv() with skb->truesize=768, the sk_forward_alloc changes like\nthis:\n(cpu 1)             | (cpu 2)             | sk_forward_alloc\n...                 | ...                 | 0\n__sk_mem_schedule() |                     | +4096 = 4096\n| __sk_mem_schedule() | +4096 = 8192\nsk_mem_charge()     |                     | -768  = 7424\n| sk_mem_charge()     | -768  = 6656\n...                 |    ...              |\nsk_mem_uncharge()   |                     | +768  = 7424\nreclaimable=7424    |                     |\n| sk_mem_uncharge()   | +768  = 8192\n| reclaimable=8192    |\n__sk_mem_reclaim()  |                     | -4096 = 4096\n| __sk_mem_reclaim()  | -8192 = -4096 != 0\nThe skb_clone_and_charge_r() should not be called in tcp_v6_do_rcv() when\nsk->sk_state is TCP_LISTEN, it happens later in tcp_v6_syn_recv_sock().\nFix the same issue in dccp_v6_do_rcv()." ],
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2025-05-13T00:00:00Z",
    "advisory" : "RHSA-2025:6966",
    "cpe" : "cpe:/a:redhat:enterprise_linux:9",
    "package" : "kernel-0:5.14.0-570.12.1.el9_6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2025-05-13T00:00:00Z",
    "advisory" : "RHSA-2025:6966",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9",
    "package" : "kernel-0:5.14.0-570.12.1.el9_6"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Will not fix",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Will not fix",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2024-53124\nhttps://nvd.nist.gov/vuln/detail/CVE-2024-53124\nhttps://lore.kernel.org/linux-cve-announce/2024120253-CVE-2024-53124-91b3@gregkh/T" ],
  "name" : "CVE-2024-53124",
  "csaw" : false
}