summaryrefslogtreecommitdiff
path: root/sound/x86
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-07-07 14:25:23 +0300
committerMark Brown <broonie@kernel.org>2023-07-17 06:15:10 +0100
commit469e2f28c2cbee2430058c1c9bb6d1675d7195fb (patch)
treefc986f5f5b025dcc124c9b86a57296a7a6a3a97e /sound/x86
parente51df4f81b02bcdd828a04de7c1eb6a92988b61e (diff)
ASoC: SOF: ipc3-dtrace: uninitialized data in dfsentry_trace_filter_write()
This doesn't check how many bytes the simple_write_to_buffer() writes to the buffer. The only thing that we know is that the first byte is initialized and the last byte of the buffer is set to NUL. However the middle bytes could be uninitialized. There is no need to use simple_write_to_buffer(). This code does not support partial writes but instead passes "pos = 0" as the starting offset regardless of what the user passed as "*ppos". Just use the copy_from_user() function and initialize the whole buffer. Fixes: 671e0b90051e ("ASoC: SOF: Clone the trace code to ipc3-dtrace as fw_tracing implementation") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/74148292-ce4d-4e01-a1a7-921e6767da14@moroto.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/x86')
0 files changed, 0 insertions, 0 deletions