Re: [Qemu-devel] [PATCH 11/29] 9pfs: local: lremovexattr: don't follow symlinks

2017-02-24 Thread Greg Kurz
On Mon, 20 Feb 2017 15:40:45 +0100 Greg Kurz wrote: > The local_lremovexattr() callback is vulnerable to symlink attacks because > it calls lremovexattr() which follows symbolic links in all path elements but > the rightmost one. > > This patch converts local_lremovexattr() to rely on opendir_no

Re: [Qemu-devel] [PATCH 11/29] 9pfs: local: lremovexattr: don't follow symlinks

2017-02-23 Thread Stefan Hajnoczi
On Mon, Feb 20, 2017 at 03:40:45PM +0100, Greg Kurz wrote: > The local_lremovexattr() callback is vulnerable to symlink attacks because > it calls lremovexattr() which follows symbolic links in all path elements but > the rightmost one. > > This patch converts local_lremovexattr() to rely on opend

[Qemu-devel] [PATCH 11/29] 9pfs: local: lremovexattr: don't follow symlinks

2017-02-20 Thread Greg Kurz
The local_lremovexattr() callback is vulnerable to symlink attacks because it calls lremovexattr() which follows symbolic links in all path elements but the rightmost one. This patch converts local_lremovexattr() to rely on opendir_nofollow() and fremovexattrat_nofollow() instead. This partly fix