diff options
author | Paulo Alcantara (SUSE) <paulo@paulo.ac> | 2019-09-05 15:49:35 -0300 |
---|---|---|
committer | Pavel Shilovsky <pshilov@microsoft.com> | 2019-10-03 17:21:02 -0700 |
commit | d7d78d7298b335e5c42567ae87b3f366e6c7f899 (patch) | |
tree | a396005e9ea30df4ba87844527f04a55bb93ba9d /smbinfo.c | |
parent | 5a468f3dcbea4bfbc380a3f86466b8e33bc40570 (diff) | |
download | cifs-utils-d7d78d7298b335e5c42567ae87b3f366e6c7f899.tar.gz cifs-utils-d7d78d7298b335e5c42567ae87b3f366e6c7f899.tar.bz2 cifs-utils-d7d78d7298b335e5c42567ae87b3f366e6c7f899.zip |
mount.cifs: Fix double-free issue when mounting with setuid root
It can be easily reproduced with the following:
# chmod +s `which mount.cifs`
# echo "//localhost/share /mnt cifs \
users,username=foo,password=XXXX" >> /etc/fstab
# su - foo
$ mount /mnt
free(): double free detected in tcache 2
Child process terminated abnormally.
The problem was that check_fstab() already freed orgoptions pointer
and then we freed it again in main() function.
Fixes: bf7f48f4c7dc ("mount.cifs.c: fix memory leaks in main func")
Signed-off-by: Paulo Alcantara (SUSE) <paulo@paulo.ac>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Diffstat (limited to 'smbinfo.c')
0 files changed, 0 insertions, 0 deletions