{
  "threat_severity" : "Low",
  "public_date" : "2025-03-27T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: powerpc/imc-pmu: Fix use of mutex in IRQs disabled section",
    "id" : "2355516",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2355516"
  },
  "cvss3" : {
    "cvss3_base_score" : "3.3",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L",
    "status" : "verified"
  },
  "cwe" : "CWE-821",
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\npowerpc/imc-pmu: Fix use of mutex in IRQs disabled section\nCurrent imc-pmu code triggers a WARNING with CONFIG_DEBUG_ATOMIC_SLEEP\nand CONFIG_PROVE_LOCKING enabled, while running a thread_imc event.\nCommand to trigger the warning:\n# perf stat -e thread_imc/CPM_CS_FROM_L4_MEM_X_DPTEG/ sleep 5\nPerformance counter stats for 'sleep 5':\n0      thread_imc/CPM_CS_FROM_L4_MEM_X_DPTEG/\n5.002117947 seconds time elapsed\n0.000131000 seconds user\n0.001063000 seconds sys\nBelow is snippet of the warning in dmesg:\nBUG: sleeping function called from invalid context at kernel/locking/mutex.c:580\nin_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 2869, name: perf-exec\npreempt_count: 2, expected: 0\n4 locks held by perf-exec/2869:\n#0: c00000004325c540 (&sig->cred_guard_mutex){+.+.}-{3:3}, at: bprm_execve+0x64/0xa90\n#1: c00000004325c5d8 (&sig->exec_update_lock){++++}-{3:3}, at: begin_new_exec+0x460/0xef0\n#2: c0000003fa99d4e0 (&cpuctx_lock){-...}-{2:2}, at: perf_event_exec+0x290/0x510\n#3: c000000017ab8418 (&ctx->lock){....}-{2:2}, at: perf_event_exec+0x29c/0x510\nirq event stamp: 4806\nhardirqs last  enabled at (4805): [<c000000000f65b94>] _raw_spin_unlock_irqrestore+0x94/0xd0\nhardirqs last disabled at (4806): [<c0000000003fae44>] perf_event_exec+0x394/0x510\nsoftirqs last  enabled at (0): [<c00000000013c404>] copy_process+0xc34/0x1ff0\nsoftirqs last disabled at (0): [<0000000000000000>] 0x0\nCPU: 36 PID: 2869 Comm: perf-exec Not tainted 6.2.0-rc2-00011-g1247637727f2 #61\nHardware name: 8375-42A POWER9 0x4e1202 opal:v7.0-16-g9b85f7d961 PowerNV\nCall Trace:\ndump_stack_lvl+0x98/0xe0 (unreliable)\n__might_resched+0x2f8/0x310\n__mutex_lock+0x6c/0x13f0\nthread_imc_event_add+0xf4/0x1b0\nevent_sched_in+0xe0/0x210\nmerge_sched_in+0x1f0/0x600\nvisit_groups_merge.isra.92.constprop.166+0x2bc/0x6c0\nctx_flexible_sched_in+0xcc/0x140\nctx_sched_in+0x20c/0x2a0\nctx_resched+0x104/0x1c0\nperf_event_exec+0x340/0x510\nbegin_new_exec+0x730/0xef0\nload_elf_binary+0x3f8/0x1e10\n...\ndo not call blocking ops when !TASK_RUNNING; state=2001 set at [<00000000fd63e7cf>] do_nanosleep+0x60/0x1a0\nWARNING: CPU: 36 PID: 2869 at kernel/sched/core.c:9912 __might_sleep+0x9c/0xb0\nCPU: 36 PID: 2869 Comm: sleep Tainted: G        W          6.2.0-rc2-00011-g1247637727f2 #61\nHardware name: 8375-42A POWER9 0x4e1202 opal:v7.0-16-g9b85f7d961 PowerNV\nNIP:  c000000000194a1c LR: c000000000194a18 CTR: c000000000a78670\nREGS: c00000004d2134e0 TRAP: 0700   Tainted: G        W           (6.2.0-rc2-00011-g1247637727f2)\nMSR:  9000000000021033 <SF,HV,ME,IR,DR,RI,LE>  CR: 48002824  XER: 00000000\nCFAR: c00000000013fb64 IRQMASK: 1\nThe above warning triggered because the current imc-pmu code uses mutex\nlock in interrupt disabled sections. The function mutex_lock()\ninternally calls __might_resched(), which will check if IRQs are\ndisabled and in case IRQs are disabled, it will trigger the warning.\nFix the issue by changing the mutex lock to spinlock.\n[mpe: Fix comments, trim oops in change log, add reported-by tags]" ],
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2023-11-07T00:00:00Z",
    "advisory" : "RHSA-2023:6583",
    "cpe" : "cpe:/a:redhat:enterprise_linux:9",
    "package" : "kernel-0:5.14.0-362.8.1.el9_3"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2023-11-07T00:00:00Z",
    "advisory" : "RHSA-2023:6583",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9",
    "package" : "kernel-0:5.14.0-362.8.1.el9_3"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 10",
    "fix_state" : "Not 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" : "Out of support scope",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Fix deferred",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2023-53031\nhttps://nvd.nist.gov/vuln/detail/CVE-2023-53031\nhttps://lore.kernel.org/linux-cve-announce/2025032721-CVE-2023-53031-39cd@gregkh/T" ],
  "name" : "CVE-2023-53031",
  "csaw" : false
}