{
  "threat_severity" : "Moderate",
  "public_date" : "2024-12-27T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: rcu/nocb: Fix missed RCU barrier on deoffloading",
    "id" : "2334521",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2334521"
  },
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\nrcu/nocb: Fix missed RCU barrier on deoffloading\nCurrently, running rcutorture test with torture_type=rcu fwd_progress=8\nn_barrier_cbs=8 nocbs_nthreads=8 nocbs_toggle=100 onoff_interval=60\ntest_boost=2, will trigger the following warning:\nWARNING: CPU: 19 PID: 100 at kernel/rcu/tree_nocb.h:1061 rcu_nocb_rdp_deoffload+0x292/0x2a0\nRIP: 0010:rcu_nocb_rdp_deoffload+0x292/0x2a0\nCall Trace:\n<TASK>\n? __warn+0x7e/0x120\n? rcu_nocb_rdp_deoffload+0x292/0x2a0\n? report_bug+0x18e/0x1a0\n? handle_bug+0x3d/0x70\n? exc_invalid_op+0x18/0x70\n? asm_exc_invalid_op+0x1a/0x20\n? rcu_nocb_rdp_deoffload+0x292/0x2a0\nrcu_nocb_cpu_deoffload+0x70/0xa0\nrcu_nocb_toggle+0x136/0x1c0\n? __pfx_rcu_nocb_toggle+0x10/0x10\nkthread+0xd1/0x100\n? __pfx_kthread+0x10/0x10\nret_from_fork+0x2f/0x50\n? __pfx_kthread+0x10/0x10\nret_from_fork_asm+0x1a/0x30\n</TASK>\nCPU0                               CPU2                          CPU3\n//rcu_nocb_toggle             //nocb_cb_wait                   //rcutorture\n// deoffload CPU1             // process CPU1's rdp\nrcu_barrier()\nrcu_segcblist_entrain()\nrcu_segcblist_add_len(1);\n// len == 2\n// enqueue barrier\n// callback to CPU1's\n// rdp->cblist\nrcu_do_batch()\n// invoke CPU1's rdp->cblist\n// callback\nrcu_barrier_callback()\nrcu_barrier()\nmutex_lock(&rcu_state.barrier_mutex);\n// still see len == 2\n// enqueue barrier callback\n// to CPU1's rdp->cblist\nrcu_segcblist_entrain()\nrcu_segcblist_add_len(1);\n// len == 3\n// decrement len\nrcu_segcblist_add_len(-2);\nkthread_parkme()\n// CPU1's rdp->cblist len == 1\n// Warn because there is\n// still a pending barrier\n// trigger warning\nWARN_ON_ONCE(rcu_segcblist_n_cbs(&rdp->cblist));\ncpus_read_unlock();\n// wait CPU1 to comes online and\n// invoke barrier callback on\n// CPU1 rdp's->cblist\nwait_for_completion(&rcu_state.barrier_completion);\n// deoffload CPU4\ncpus_read_lock()\nrcu_barrier()\nmutex_lock(&rcu_state.barrier_mutex);\n// block on barrier_mutex\n// wait rcu_barrier() on\n// CPU3 to unlock barrier_mutex\n// but CPU3 unlock barrier_mutex\n// need to wait CPU1 comes online\n// when CPU1 going online will block on cpus_write_lock\nThe above scenario will not only trigger a WARN_ON_ONCE(), but also\ntrigger a deadlock.\nThanks to nocb locking, a second racing rcu_barrier() on an offline CPU\nwill either observe the decremented callback counter down to 0 and spare\nthe callback enqueue, or rcuo will observe the new callback and keep\nrdp->nocb_cb_sleep to false.\nTherefore check rdp->nocb_cb_sleep before parking to make sure no\nfurther rcu_barrier() is waiting on the rdp." ],
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 10.0 Extended Update Support",
    "release_date" : "2026-06-01T00:00:00Z",
    "advisory" : "RHSA-2026:22334",
    "cpe" : "cpe:/o:redhat:enterprise_linux_eus:10.0",
    "package" : "kernel-0:6.12.0-55.76.1.el10_0"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 10",
    "fix_state" : "Affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:10"
  }, {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2024-56547\nhttps://nvd.nist.gov/vuln/detail/CVE-2024-56547\nhttps://lore.kernel.org/linux-cve-announce/2024122729-CVE-2024-56547-c340@gregkh/T" ],
  "name" : "CVE-2024-56547",
  "csaw" : false
}