In the Linux kernel, the following vulnerability has been resolved:
irqchip/imx-irqsteer: Handle runtime power management correctly
The power domain is automatically activated from clk_prepare(). However, on certain platforms like i.MX8QM and i.MX8QXP, the power-on handling invokes sleeping functions, which triggers the 'scheduling while atomic' bug in the context switch path during device probing:
BUG: scheduling while atomic: kworker/u13:1/48/0x00000002 Call trace: _schedulebug+0x54/0x6c _schedule+0x7f0/0xa94 schedule+0x5c/0xc4 schedulepreemptdisabled+0x24/0x40 _mutexlock.constprop.0+0x2c0/0x540 _mutexlockslowpath+0x14/0x20 mutexlock+0x48/0x54 clkpreparelock+0x44/0xa0 clkprepare+0x20/0x44 imxirqsteerresume+0x28/0xe0 pmgenericruntimeresume+0x2c/0x44 _genpdruntimeresume+0x30/0x80 genpdruntimeresume+0xc8/0x2c0 _rpmcallback+0x48/0x1d8 rpmcallback+0x6c/0x78 rpmresume+0x490/0x6b4 _pmruntimeresume+0x50/0x94 irqchippmget+0x2c/0xa0 _irqdosethandler+0x178/0x24c irqsetchainedhandleranddata+0x60/0xa4 mxcgpio_probe+0x160/0x4b0
Cure this by implementing the irqbuslock/sync_unlock() interrupt chip callbacks and handle power management in them as they are invoked from non-atomic context.
[ tglx: Rewrote change log, added Fixes tag ]
[ { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fa1803401e1c360efe6342fb41d161cc51748a11", "signature_version": "v1", "target": { "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "327857464814044861947896214962090263635", "238519214852673736937272755618063040325", "55458327549346120208710737974574844470", "228347383009088039495941475098395588410", "127899351436343769695360684411911301321", "200333513407045609207275578403907607964", "16632992279467108135624097936683512312", "86144186481214952851080667839156183733", "64557502845162799844936728518852825489", "53811109967858862671575843701877866982", "73551689907458198424716241959714353506", "14369278676625852495928413204416781996", "239806591141352305214298657983903947374", "192010848441647260648456325607199992115" ] }, "id": "CVE-2024-42290-19796b47" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@21bd3f9e7f924cd2fc892a484e7a50c7e1847565", "signature_version": "v1", "target": { "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "327857464814044861947896214962090263635", "238519214852673736937272755618063040325", "55458327549346120208710737974574844470", "228347383009088039495941475098395588410", "127899351436343769695360684411911301321", "200333513407045609207275578403907607964", "16632992279467108135624097936683512312", "86144186481214952851080667839156183733", "64557502845162799844936728518852825489", "53811109967858862671575843701877866982", "73551689907458198424716241959714353506", "14369278676625852495928413204416781996", "239806591141352305214298657983903947374", "192010848441647260648456325607199992115" ] }, "id": "CVE-2024-42290-1ace43c1" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f8ae38f1dfe652779c7c613facbc257cec00ac44", "signature_version": "v1", "target": { "function": "imx_irqsteer_probe", "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "function_hash": "131487314739920436579762422094553693879", "length": 1947.0 }, "id": "CVE-2024-42290-28c132ed" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3a2884a44e5cda192df1b28e9925661f79f599a1", "signature_version": "v1", "target": { "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "327857464814044861947896214962090263635", "238519214852673736937272755618063040325", "55458327549346120208710737974574844470", "228347383009088039495941475098395588410", "127899351436343769695360684411911301321", "200333513407045609207275578403907607964", "16632992279467108135624097936683512312", "86144186481214952851080667839156183733", "64557502845162799844936728518852825489", "53811109967858862671575843701877866982", "73551689907458198424716241959714353506", "14369278676625852495928413204416781996", "239806591141352305214298657983903947374", "192010848441647260648456325607199992115" ] }, "id": "CVE-2024-42290-59858c88" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@21bd3f9e7f924cd2fc892a484e7a50c7e1847565", "signature_version": "v1", "target": { "function": "imx_irqsteer_probe", "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "function_hash": "131487314739920436579762422094553693879", "length": 1947.0 }, "id": "CVE-2024-42290-91684883" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3a2884a44e5cda192df1b28e9925661f79f599a1", "signature_version": "v1", "target": { "function": "imx_irqsteer_probe", "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "function_hash": "131487314739920436579762422094553693879", "length": 1947.0 }, "id": "CVE-2024-42290-a1398c79" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58c56735facb225a5c46fa4b8bbbe7f31d1cb894", "signature_version": "v1", "target": { "function": "imx_irqsteer_probe", "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "function_hash": "131487314739920436579762422094553693879", "length": 1947.0 }, "id": "CVE-2024-42290-a7364e49" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a590e8dea3df2639921f874d763be961dd74e8f9", "signature_version": "v1", "target": { "function": "imx_irqsteer_probe", "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "function_hash": "302799771004748909045695765052318605489", "length": 2002.0 }, "id": "CVE-2024-42290-b2224e6c" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@33b1c47d1fc0b5f06a393bb915db85baacba18ea", "signature_version": "v1", "target": { "function": "imx_irqsteer_probe", "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "function_hash": "131487314739920436579762422094553693879", "length": 1947.0 }, "id": "CVE-2024-42290-c1daef9b" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58c56735facb225a5c46fa4b8bbbe7f31d1cb894", "signature_version": "v1", "target": { "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "327857464814044861947896214962090263635", "238519214852673736937272755618063040325", "55458327549346120208710737974574844470", "228347383009088039495941475098395588410", "127899351436343769695360684411911301321", "200333513407045609207275578403907607964", "16632992279467108135624097936683512312", "86144186481214952851080667839156183733", "64557502845162799844936728518852825489", "53811109967858862671575843701877866982", "73551689907458198424716241959714353506", "14369278676625852495928413204416781996", "239806591141352305214298657983903947374", "192010848441647260648456325607199992115" ] }, "id": "CVE-2024-42290-cfa8227c" }, { "signature_type": "Function", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fa1803401e1c360efe6342fb41d161cc51748a11", "signature_version": "v1", "target": { "function": "imx_irqsteer_probe", "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "function_hash": "131487314739920436579762422094553693879", "length": 1947.0 }, "id": "CVE-2024-42290-d5207dd2" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a590e8dea3df2639921f874d763be961dd74e8f9", "signature_version": "v1", "target": { "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "327857464814044861947896214962090263635", "238519214852673736937272755618063040325", "55458327549346120208710737974574844470", "228347383009088039495941475098395588410", "127899351436343769695360684411911301321", "200333513407045609207275578403907607964", "16632992279467108135624097936683512312", "86144186481214952851080667839156183733", "64557502845162799844936728518852825489", "53811109967858862671575843701877866982", "73551689907458198424716241959714353506", "14369278676625852495928413204416781996", "239806591141352305214298657983903947374", "192010848441647260648456325607199992115" ] }, "id": "CVE-2024-42290-d758a993" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@33b1c47d1fc0b5f06a393bb915db85baacba18ea", "signature_version": "v1", "target": { "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "327857464814044861947896214962090263635", "238519214852673736937272755618063040325", "55458327549346120208710737974574844470", "228347383009088039495941475098395588410", "127899351436343769695360684411911301321", "200333513407045609207275578403907607964", "16632992279467108135624097936683512312", "86144186481214952851080667839156183733", "64557502845162799844936728518852825489", "53811109967858862671575843701877866982", "73551689907458198424716241959714353506", "14369278676625852495928413204416781996", "239806591141352305214298657983903947374", "192010848441647260648456325607199992115" ] }, "id": "CVE-2024-42290-e168a6fe" }, { "signature_type": "Line", "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f8ae38f1dfe652779c7c613facbc257cec00ac44", "signature_version": "v1", "target": { "file": "drivers/irqchip/irq-imx-irqsteer.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "327857464814044861947896214962090263635", "238519214852673736937272755618063040325", "55458327549346120208710737974574844470", "228347383009088039495941475098395588410", "127899351436343769695360684411911301321", "200333513407045609207275578403907607964", "16632992279467108135624097936683512312", "86144186481214952851080667839156183733", "64557502845162799844936728518852825489", "53811109967858862671575843701877866982", "73551689907458198424716241959714353506", "14369278676625852495928413204416781996", "239806591141352305214298657983903947374", "192010848441647260648456325607199992115" ] }, "id": "CVE-2024-42290-eb229045" } ]