android_kernel_samsung_sm8650/arch/arm64/gunyah
Hrishabh Rajput a9cdae1f20 gunyah: arm64: Fix possible irq_data use-after-free
Access to irq_data is maintained using RCU. In irq_dispose_mapping(),
unmapping and freeing of the irq data is done asynchronously using
call_rcu() API when the conditions are met.

In the next instruction, the same irq_data which is passed on for
freeing is used to retrieve virq number. This creates use-after-free
case if the task gets preempted out after the call to
irq_dispose_mapping() and irq_data gets freed asynchronously before it
gets scheduled back.

As a fix, this patch introduces a variable to store virq number
beforehand so that no access to irq_data is made after
irq_dispose_mapping() is called.

Change-Id: I2f6b4d98d953e0ce1ff55455453965d8c942c942
Signed-off-by: Hrishabh Rajput <quic_hrishabh@quicinc.com>
2024-05-08 18:14:12 +05:30
..
gh_arm.c gunyah: Adding basic initial files needed for vm on Pineapple 2022-08-10 23:11:03 -07:00
gunyah_hypercall.c ANDROID: Snap to android14-6.1-2023-06 2023-08-08 17:02:27 -07:00
irq.c gunyah: arm64: Fix possible irq_data use-after-free 2024-05-08 18:14:12 +05:30
Kconfig gunyah: Adding basic initial files needed for vm on Pineapple 2022-08-10 23:11:03 -07:00
Makefile Merge keystone/android14-6.1-keystone-qcom-release.6.1.22 (cc425b8) into msm-pineapple 2023-04-25 19:46:05 -07:00
reset.c virt: gunyah: rm_core: Validate notifications using payload size only 2022-12-22 17:24:08 -08:00
reset.h gunyah: Adding basic initial files needed for vm on Pineapple 2022-08-10 23:11:03 -07:00