lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 4 Oct 2015 09:57:26 +0200 (CEST)
From:	Nicolas Parpandet <npa@....biz>
To:	linux-kernel@...r.kernel.org
Cc:	pcoustillas <pcoustillas@....biz>
Subject: nfs race condition


Hello, 

I'm doing some " crontab -e, exit with :x" on NFS mount point, 
and there is a race condition whent removing temporary files : 


7701 write(2, "No modification made\n", 21) = 21 
7701 open("/tmp/crontab.vYPoHR", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4 
7701 getdents(4, {{d_ino=73336409, d_off=1, d_reclen=24, d_name="."} {d_ino=73335455, d_off=2, d_reclen=24, d_name=".."} {d_ino=73340547, d_off=3, d_reclen=32, d_name="crontab"}}, 32768) = 80 
7701 unlink("/tmp/crontab.vYPoHR/crontab") = 0 
7701 getdents(4, {}, 32768) = 0 
7701 close(4) = 0 
7701 rmdir("/tmp/crontab.vYPoHR") = -1 ENOTEMPTY (Directory not empty) 
7701 write(2, "/tmp/crontab.vYPoHR: Directory n"..., 41) = 41 
7701 socket(PF_FILE, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 4

The unlink is really done after the rmdir,
nfsv4 & nfsv3 over ipv6, so the rmdir fails and the directory isn't removed.
I have same problem with mysql temporary files.

If I mount with "nocto,noac,lookupcache=none" : same problem
kernel version on server : 3.16.0-4-amd64 (debian8)
kernel version on client : 2.6.32-39-pve (proxmox), same thing with 3.13.0-63-generic (ubuntu)

Please answer me in CC, I'm not subscribed to the list.

Regards

Nicolas 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ