]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: pcm: oss: Fix data race at accessing runtime.oss.trigger
authorTakashi Iwai <tiwai@suse.de>
Fri, 24 Apr 2026 11:21:55 +0000 (13:21 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 27 Apr 2026 11:49:58 +0000 (13:49 +0200)
commit901ac0ff15edf9503162e2cf6579bd11a30f1ed4
tree44b2f76e367ea4382147b58037a03ae5f892f33e
parent0faacc0841d66f3cf51989c10a83f3a82d52ff2c
ALSA: pcm: oss: Fix data race at accessing runtime.oss.trigger

Currently the runtime.oss.trigger field may be accessed concurrently
without protection, which may lead to the data race.  And, in this
case, it may lead to more severe problem because it's a bit field; as
writing the data, it may overwrite other bit fields as well, which
confuses the operation completely, as spotted by fuzzing.

Fix it by covering runtime.oss.trigger bit fled also with the existing
params_lock mutex in both snd_pcm_oss_get_trigger() and
snd_pcm_oss_poll().

Reported-and-tested-by: Jaeyoung Chung <jjy600901@snu.ac.kr>
Closes: https://lore.kernel.org/20260423145330.210035-1-jjy600901@snu.ac.kr
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20260424112205.123703-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_oss.c