diff options
author | Hyunchul Lee <[email protected]> | 2021-09-25 00:06:16 +0900 |
---|---|---|
committer | Steve French <[email protected]> | 2021-09-24 21:25:23 -0500 |
commit | 265fd1991c1db85fbabaad4946ca0e63e2ae688d (patch) | |
tree | f243e175b7a357f16b0b8494268c2b1e82996d21 /fs/btrfs/tree-mod-log.c | |
parent | 4ea477988c423a57241ea4840b12832de6fabdfd (diff) |
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 <[email protected]>
Cc: Ralph Boehme <[email protected]>
Tested-by: Steve French <[email protected]>
Tested-by: Namjae Jeon <[email protected]>
Acked-by: Namjae Jeon <[email protected]>
Signed-off-by: Hyunchul Lee <[email protected]>
Signed-off-by: Steve French <[email protected]>
Diffstat (limited to 'fs/btrfs/tree-mod-log.c')
0 files changed, 0 insertions, 0 deletions