Skip to content

Commit 3b9237e

Browse files
crojewsk-intelopsiff
authored andcommitted
ASoC: Intel: avs: Fix theoretical infinite loop
[ Upstream commit cf4d742 ] While 'stack_dump_size' is a u32 bitfield of 16 bits, u32 has a bigger upper bound than the type u16 of loop counter 'offset' what in theory may lead to infinite loop condition. Found out by Coverity static analyzer. Fixes: c8c960c ("ASoC: Intel: avs: APL-based platforms support") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit a6d04a7a627843563461ff6a1d5d528960c5b9c6)
1 parent d527128 commit 3b9237e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/soc/intel/avs/apl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static int avs_apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)
107107
struct avs_apl_log_buffer_layout layout;
108108
void __iomem *addr, *buf;
109109
size_t dump_size;
110-
u16 offset = 0;
110+
u32 offset = 0;
111111
u8 *dump, *pos;
112112

113113
dump_size = AVS_FW_REGS_SIZE + msg->ext.coredump.stack_dump_size;

0 commit comments

Comments
 (0)