diff options
author | 2021-04-16 10:35:30 +0300 | |
---|---|---|
committer | 2021-04-25 16:28:24 -0500 | |
commit | a637f4ae037e1e0604ac008564934d63261a8fd1 (patch) | |
tree | 6a493b841d7fc45d87431b30a7dd3e21ccac6c44 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | smb2: fix use-after-free in smb2_ioctl_query_info() (diff) | |
download | linux-rng-a637f4ae037e1e0604ac008564934d63261a8fd1.tar.xz linux-rng-a637f4ae037e1e0604ac008564934d63261a8fd1.zip |
cifs: fix out-of-bound memory access when calling smb3_notify() at mount point
If smb3_notify() is called at mount point of CIFS, build_path_from_dentry()
returns the pointer to kmalloc-ed memory with terminating zero (this is
empty FileName to be passed to SMB2 CREATE request). This pointer is assigned
to the `path` variable.
Then `path + 1` (to skip first backslash symbol) is passed to
cifs_convert_path_to_utf16(). This is incorrect for empty path and causes
out-of-bound memory access.
Get rid of this "increase by one". cifs_convert_path_to_utf16() already
contains the check for leading backslash in the path.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212693
CC: <stable@vger.kernel.org> # v5.6+
Signed-off-by: Eugene Korenevsky <ekorenevsky@astralinux.ru>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions