Commit 6f0e4f7
committed
ASoC: SOF: Intel: hda: Fix potential buffer overflow by snprintf()
jira VULN-70503
cve CVE-2022-50050
commit-author Takashi Iwai <tiwai@suse.de>
commit 94c1ceb
upstream-diff |
Adjusted context due to missing commit
71778f7("ASoC: SOF: Intel: hda: Define rom_status_reg in sof_intel_dsp_desc")
snprintf() returns the would-be-filled size when the string overflows
the given buffer size, hence using this value may result in the buffer
overflow (although it's unrealistic).
This patch replaces with a safer version, scnprintf() for papering
over such a potential issue.
Fixes: 29c8e43 ("ASoC: SOF: Intel: hda: add extended rom status dump to error log")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220801165420.25978-4-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 94c1ceb)
Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>1 parent 4aaae6f commit 6f0e4f7
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
| 539 | + | |
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
| |||
0 commit comments