Re: [Qemu-devel] [PATCH] 9pfs: fix potential segfault during walk

2016-09-16 Thread Cédric Le Goater
On 09/16/2016 10:52 AM, Greg Kurz wrote: > On Fri, 16 Sep 2016 09:37:48 +0200 > Cédric Le Goater wrote: > >> On 09/16/2016 09:19 AM, Greg Kurz wrote: >>> On Fri, 16 Sep 2016 01:05:11 +0200 >>> Greg Kurz wrote: >>> If the call to fid_to_qid() returns an error, we will call v9fs_path_free(

Re: [Qemu-devel] [PATCH] 9pfs: fix potential segfault during walk

2016-09-16 Thread Greg Kurz
On Fri, 16 Sep 2016 09:37:48 +0200 Cédric Le Goater wrote: > On 09/16/2016 09:19 AM, Greg Kurz wrote: > > On Fri, 16 Sep 2016 01:05:11 +0200 > > Greg Kurz wrote: > > > >> If the call to fid_to_qid() returns an error, we will call v9fs_path_free() > >> on uninitialized paths. > >> > > > > I

Re: [Qemu-devel] [PATCH] 9pfs: fix potential segfault during walk

2016-09-16 Thread Cédric Le Goater
On 09/16/2016 09:19 AM, Greg Kurz wrote: > On Fri, 16 Sep 2016 01:05:11 +0200 > Greg Kurz wrote: > >> If the call to fid_to_qid() returns an error, we will call v9fs_path_free() >> on uninitialized paths. >> > > I'll add this to the changelog: > > It is a regression introduced by the following

Re: [Qemu-devel] [PATCH] 9pfs: fix potential segfault during walk

2016-09-16 Thread Greg Kurz
On Fri, 16 Sep 2016 01:05:11 +0200 Greg Kurz wrote: > If the call to fid_to_qid() returns an error, we will call v9fs_path_free() > on uninitialized paths. > I'll add this to the changelog: It is a regression introduced by the following commit: 56f101ecce0e 9pfs: handle walk of ".." in the ro

[Qemu-devel] [PATCH] 9pfs: fix potential segfault during walk

2016-09-15 Thread Greg Kurz
If the call to fid_to_qid() returns an error, we will call v9fs_path_free() on uninitialized paths. Let's fix this by initializing dpath and path before calling fid_to_qid(). Signed-off-by: Greg Kurz --- Thanks Paolo (and Coverity) for spotting this. Cc'ing stable as this is a regression intro