diff options
author | Hyunchul Lee <hyc.lee@gmail.com> | 2021-09-25 00:06:16 +0900 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-09-24 21:25:23 -0500 |
commit | 265fd1991c1db85fbabaad4946ca0e63e2ae688d (patch) | |
tree | f243e175b7a357f16b0b8494268c2b1e82996d21 /fs/iomap | |
parent | 4ea477988c423a57241ea4840b12832de6fabdfd (diff) | |
download | linux-265fd1991c1db85fbabaad4946ca0e63e2ae688d.tar.bz2 |
ksmbd: use LOOKUP_BENEATH to prevent the out of share access
instead of removing '..' in a given path, call
kern_path with LOOKUP_BENEATH flag to prevent
the out of share access.
ran various test on this:
smb2-cat-async smb://127.0.0.1/homes/../out_of_share
smb2-cat-async smb://127.0.0.1/homes/foo/../../out_of_share
smbclient //127.0.0.1/homes -c "mkdir ../foo2"
smbclient //127.0.0.1/homes -c "rename bar ../bar"
Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Cc: Ralph Boehme <slow@samba.org>
Tested-by: Steve French <smfrench@gmail.com>
Tested-by: Namjae Jeon <linkinjeon@kernel.org>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/iomap')
0 files changed, 0 insertions, 0 deletions