CVE: CVE-2024-56575
Published: 2024-12-27
Description: In the Linux kernel, the following vulnerability has been resolved:

media: imx-jpeg: Ensure power suppliers be suspended before detach them

The power suppliers are always requested to suspend asynchronously,
dev_pm_domain_detach() requires the caller to ensure proper
synchronization of this function with power management callbacks.
otherwise the detach may led to kernel panic, like below:

[ 1457.107934] Unable to handle kernel NULL pointer dereference at virtual address [PII_REDACTED]
[ 1457.116777] Mem abort info:
[ 1457.119589]   ESR = 0x[PII_REDACTED]000004
[ 1457.123358]   EC = 0x25: DABT (current EL), IL = 32 bits
[ 1457.128692]   SET = 0, FnV = 0
[ 1457.131764]   EA = 0, S1PTW = 0
[ 1457.134920]   FSC = 0x04: level 0 translation fault
[ 1457.139812] Data abort info:
[ 1457.142707]   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
[ 1457.148196]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[ 1457.153256]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[ 1457.158563] user pgtable: 4k pages, 48-bit VAs, pgdp=[PII_REDACTED]8b6000
[ 1457.165000] [[PII_REDACTED]] pgd=[PII_REDACTED], p4d=[PII_REDACTED]
[ 1457.171792] Internal error: Oops: [PII_REDACTED] [#1] PREEMPT SMP
[ 1457.178045] Modules linked in: v4l2_jpeg wave6_vpu_ctrl(-) [last unloaded: mxc_jpeg_encdec]
[ 1457.186383] CPU: 0 PID: 51938 Comm: kworker/0:3 Not tainted 6.6.36-gd23d64eea511 #66
[ 1457.194112] Hardware name: NXP i.MX95 19X19 board (DT)
[ 1457.199236] Workqueue: pm pm_runtime_work
[ 1457.203247] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 1457.210188] pc : genpd_runtime_suspend+0x20/0x290
[ 1457.214886] lr : __rpm_callback+0x48/0x1d8
[ 1457.218968] sp : ffff80008250bc50
[ 1457.222270] x29: ffff80008250bc50 x28: [PII_REDACTED] x27: [PII_REDACTED]
[ 1457.229394] x26: [PII_REDACTED] x25: [PII_REDACTED] x24:[PII_REDACTED]0f4240
[ 1457.236518] x23: [PII_REDACTED] x22: ffff00008590f0e4 x21: [PII_REDACTED]
[ 1457.243642] x20: ffff80008099c434 x19: ffff00008590f000 x18: ffffffffffffffff
[ 1457.250766] x17: [PII_REDACTED] x16: 645f676e696c6f6f x15: 63343a6d726f6674
[ 1457.257890] x14: [PII_REDACTED] x13:[PII_REDACTED]0003a4 x12: [PII_REDACTED]
[ 1457.265014] x11: [PII_REDACTED] x10:[PII_REDACTED]000a60 x9 : ffff80008250bbb0
[ 1457.272138] x8 : ffff[PII_REDACTED]00 x7 : ffff0003fdf6af80 x6 : [PII_REDACTED]
[ 1457.279262] x5 :[PII_REDACTED]0fd050 x4 : [PII_REDACTED] x3 : [PII_REDACTED]
[ 1457.286386] x2 : [PII_REDACTED] x1 : [PII_REDACTED] x0 : ffff00008590f000
[ 1457.293510] Call trace:
[ 1457.295946]  genpd_runtime_suspend+0x20/0x290
[ 1457.300296]  __rpm_callback+0x48/0x1d8
[ 1457.304038]  rpm_callback+0x6c/0x78
[ 1457.307515]  rpm_suspend+0x10c/0x570
[ 1457.311077]  pm_runtime_work+0xc4/0xc8
[ 1457.314813]  process_one_work+0x138/0x248
[ 1457.318816]  worker_thread+0x320/0x438
[ 1457.322552]  kthread+0x110/0x114
[ 1457.325767]  ret_from_fork+0x10/0x20
CVSS Score: 5.5 (MEDIUM)
CWE: CWE-476, CWE-476
References: https://git.kernel.org/stable/c/12914fd765ba4f9d6a9a50439e8dd2e9f91423f2; https://git.kernel.org/stable/c/2f86d104539fab9181ea7b5721f40e7b92a8bf67; https://git.kernel.org/stable/c/b7a830bbc25da0f641e3ef2bac3b1766b2777a8b