2021-09-25 0:06 GMT+09:00, Hyunchul Lee <hyc.lee@xxxxxxxxx>: > 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@xxxxxxxxx> > Cc: Ralph Boehme <slow@xxxxxxxxx> > Cc: Steve French <smfrench@xxxxxxxxx> > Cc: Namjae Jeon <linkinjeon@xxxxxxxxxx> > Signed-off-by: Hyunchul Lee <hyc.lee@xxxxxxxxx> Looks good to me! Acked-by: Namjae Jeon <linkinjeon@xxxxxxxxxx> Thanks!