android_kernel_samsung_sm8650/include/uapi/sound
Baisong Zhong 83ddd4cc8f ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT
[ Upstream commit cf59e1e4c79bf741905484cdb13c130b53576a16 ]

Shifting signed 32-bit value by 31 bits is undefined, so changing
significant bit to unsigned. The UBSAN warning calltrace like below:

UBSAN: shift-out-of-bounds in sound/core/seq/seq_clientmgr.c:509:22
left shift of 1 by 31 places cannot be represented in type 'int'
...
Call Trace:
 <TASK>
 dump_stack_lvl+0x8d/0xcf
 ubsan_epilogue+0xa/0x44
 __ubsan_handle_shift_out_of_bounds+0x1e7/0x208
 snd_seq_deliver_single_event.constprop.21+0x191/0x2f0
 snd_seq_deliver_event+0x1a2/0x350
 snd_seq_kernel_client_dispatch+0x8b/0xb0
 snd_seq_client_notify_subscription+0x72/0xa0
 snd_seq_ioctl_subscribe_port+0x128/0x160
 snd_seq_kernel_client_ctl+0xce/0xf0
 snd_seq_oss_create_client+0x109/0x15b
 alsa_seq_oss_init+0x11c/0x1aa
 do_one_initcall+0x80/0x440
 kernel_init_freeable+0x370/0x3c3
 kernel_init+0x1b/0x190
 ret_from_fork+0x1f/0x30
 </TASK>

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Baisong Zhong <zhongbaisong@huawei.com>
Link: https://lore.kernel.org/r/20221121111630.3119259-1-zhongbaisong@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:32:14 +01:00
..
intel/avs ASoC: Intel: avs: Declare vendor tokens 2022-04-19 12:03:49 +01:00
sof sound updates for 6.0-rc1 2022-08-06 10:19:51 -07:00
asequencer.h ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT 2022-12-31 13:32:14 +01:00
asoc.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
asound_fm.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
asound.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
compress_offload.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
compress_params.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
emu10k1.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
firewire.h treewide: uapi: Replace zero-length arrays with flexible-array members 2022-06-28 21:26:05 +02:00
hdsp.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
hdspm.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
sb16_csp.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
sfnt_info.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
skl-tplg-interface.h treewide: uapi: Replace zero-length arrays with flexible-array members 2022-06-28 21:26:05 +02:00
snd_ar_tokens.h ASoC: qdsp6: audioreach: add topology support 2021-10-26 13:50:07 +01:00
snd_sst_tokens.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
tlv.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
usb_stream.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00