Commit ac3e9b5
ALSA: pcm: oss: Fix data race at accessing runtime.oss.trigger
commit 901ac0f upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent f8ad9ef commit ac3e9b5
1 file changed
Lines changed: 23 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2146 | 2146 | | |
2147 | 2147 | | |
2148 | 2148 | | |
2149 | | - | |
2150 | | - | |
2151 | | - | |
2152 | | - | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
2153 | 2159 | | |
2154 | 2160 | | |
2155 | 2161 | | |
| |||
2823 | 2829 | | |
2824 | 2830 | | |
2825 | 2831 | | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
2826 | 2843 | | |
2827 | 2844 | | |
2828 | 2845 | | |
| |||
2855 | 2872 | | |
2856 | 2873 | | |
2857 | 2874 | | |
2858 | | - | |
| 2875 | + | |
| 2876 | + | |
2859 | 2877 | | |
2860 | 2878 | | |
2861 | 2879 | | |
2862 | | - | |
2863 | 2880 | | |
2864 | 2881 | | |
2865 | 2882 | | |
| |||
0 commit comments