qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] 9pfs-local: open2() deletes existing data?


From: Michael Tokarev
Subject: [Qemu-devel] 9pfs-local: open2() deletes existing data?
Date: Thu, 05 Mar 2015 00:10:35 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0

I was looking at various interesting functions in hw/9pfs/virtio-9p-local.c
and noticed local_open2() which basically tries to open a file in a
filesystem, and if that is successful, it tries to set file credentials
using a configured mechanism, and if that fails, it deletes the file.

Now I wonder what happens if we tried to open an existing file but was
not able to set credentials for whatever reason -- eg, because the
underlying filesystem does not support xattrs, or whatever.  It looks
to me that we will remove the user file!

If that's the case, it looks like it is a very serious bug...

Thanks,

/mjt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]