diff options
| author | Clement Lecigne <[email protected]> | 2023-01-13 12:07:45 +0000 |
|---|---|---|
| committer | Takashi Iwai <[email protected]> | 2023-01-13 13:15:26 +0000 |
| commit | 56b88b50565cd8b946a2d00b0c83927b7ebb055e (patch) | |
| tree | 43fee411773c5e23bea239684a8bca805db8c574 /rust/compiler_builtins.rs | |
| parent | ALSA: usb-audio: Fix possible NULL pointer dereference in snd_usb_pcm_has_fix... (diff) | |
| download | kernel-56b88b50565cd8b946a2d00b0c83927b7ebb055e.tar.gz kernel-56b88b50565cd8b946a2d00b0c83927b7ebb055e.zip | |
ALSA: pcm: Move rwsem lock inside snd_ctl_elem_read to prevent UAF
Takes rwsem lock inside snd_ctl_elem_read instead of snd_ctl_elem_read_user
like it was done for write in commit 1fa4445f9adf1 ("ALSA: control - introduce
snd_ctl_notify_one() helper"). Doing this way we are also fixing the following
locking issue happening in the compat path which can be easily triggered and
turned into an use-after-free.
64-bits:
snd_ctl_ioctl
snd_ctl_elem_read_user
[takes controls_rwsem]
snd_ctl_elem_read [lock properly held, all good]
[drops controls_rwsem]
32-bits:
snd_ctl_ioctl_compat
snd_ctl_elem_write_read_compat
ctl_elem_write_read
snd_ctl_elem_read [missing lock, not good]
CVE-2023-0266 was assigned for this issue.
Cc: [email protected] # 5.13+
Signed-off-by: Clement Lecigne <[email protected]>
Reviewed-by: Jaroslav Kysela <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'rust/compiler_builtins.rs')
0 files changed, 0 insertions, 0 deletions
