mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
CVE-2022-3592 smbd: No empty path components in openat_pathref_dirfsp_nosymlink()
Upper layers must have filtered this, everything else is a bug Bug: https://bugzilla.samba.org/show_bug.cgi?id=15207 Signed-off-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
3007e32072
commit
4fbcfb285a
@ -817,6 +817,12 @@ NTSTATUS openat_pathref_dirfsp_nosymlink(
|
||||
|
||||
next = strv_next(path, rel_fname.base_name);
|
||||
|
||||
/*
|
||||
* Path sanitizing further up has cleaned or rejected
|
||||
* empty path components. Assert this here.
|
||||
*/
|
||||
SMB_ASSERT(rel_fname.base_name[0] != '\0');
|
||||
|
||||
if (ISDOT(rel_fname.base_name) || ISDOTDOT(rel_fname.base_name)) {
|
||||
DBG_DEBUG("%s contains a dot\n", path_in);
|
||||
status = NT_STATUS_OBJECT_NAME_INVALID;
|
||||
|
Loading…
x
Reference in New Issue
Block a user