diff options
| author | Pengpeng Hou <pengpeng@iscas.ac.cn> | 2026-04-03 09:55:12 +0300 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2026-05-03 19:30:08 +0300 |
| commit | 45c7bda7b7440183850012153988e40b300f40d0 (patch) | |
| tree | 1243b91242506baefd088a979e3f69bdab4be0d1 /scripts/basic | |
| parent | be6d8daaab654e9b0a8508757534d556d399d0cd (diff) | |
| download | linux-45c7bda7b7440183850012153988e40b300f40d0.tar.xz | |
soundwire: validate DT compatible before parsing it
`sdw_of_find_slaves()` fetches raw `"compatible"` bytes with
`of_get_property()` and then immediately parses them with
`sscanf("sdw%01x%04hx%04hx%02hhx", ...)`.
Live-tree OF properties are stored as raw bytes plus a separate length;
they are not globally guaranteed to be NUL-terminated. Validate the
first compatible string before parsing it.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260403183504.4-soundwire-compatible-pengpeng@iscas.ac.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
