diff options
author | Johan Hovold <johan@kernel.org> | 2021-12-01 16:25:27 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-21 12:14:52 +0300 |
commit | 433b7cd1e702b0918ef90cbf06c3da24313625d2 (patch) | |
tree | 3bfe692bdd9e3d13aae9916b19ec7e7f1782c401 /fs/ioctl.c | |
parent | 47a1db8e797da01a1309bf42e0c0d771d4e4d4f3 (diff) | |
download | linux-433b7cd1e702b0918ef90cbf06c3da24313625d2.tar.xz |
firmware: qemu_fw_cfg: fix sysfs information leak
Make sure to always NUL-terminate file names retrieved from the firmware
to avoid accessing data beyond the entry slab buffer and exposing it
through sysfs in case the firmware data is corrupt.
Fixes: 75f3e8e47f38 ("firmware: introduce sysfs driver for QEMU's fw_cfg device")
Cc: stable@vger.kernel.org # 4.6
Cc: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20211201132528.30025-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ioctl.c')
0 files changed, 0 insertions, 0 deletions