diff options
| author | Norbert Szetei <[email protected]> | 2025-05-01 23:21:58 +0000 |
|---|---|---|
| committer | Steve French <[email protected]> | 2025-05-06 13:36:36 +0000 |
| commit | 0ca6df4f40cf4c32487944aaf48319cb6c25accc (patch) | |
| tree | 6c6870faed751359efd301b052610fd7f04a1517 /tools/testing/selftests/drivers/net/lib/py/load.py | |
| parent | ksmbd: fix memory leak in parse_lease_state() (diff) | |
| download | kernel-0ca6df4f40cf4c32487944aaf48319cb6c25accc.tar.gz kernel-0ca6df4f40cf4c32487944aaf48319cb6c25accc.zip | |
ksmbd: prevent out-of-bounds stream writes by validating *pos
ksmbd_vfs_stream_write() did not validate whether the write offset
(*pos) was within the bounds of the existing stream data length (v_len).
If *pos was greater than or equal to v_len, this could lead to an
out-of-bounds memory write.
This patch adds a check to ensure *pos is less than v_len before
proceeding. If the condition fails, -EINVAL is returned.
Cc: [email protected]
Signed-off-by: Norbert Szetei <[email protected]>
Acked-by: Namjae Jeon <[email protected]>
Signed-off-by: Steve French <[email protected]>
Diffstat (limited to 'tools/testing/selftests/drivers/net/lib/py/load.py')
0 files changed, 0 insertions, 0 deletions
