All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1785902] [NEW] local/9pfs: Too many levels of symbolic links
@ 2018-08-07 21:28 Enrico Weigelt, metux IT consult
  2018-08-08  5:39 ` [Qemu-devel] [Bug 1785902] " Enrico Weigelt, metux IT consult
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2018-08-07 21:28 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Version: 2.9.1

The primary symptom is resolving symlink fails w/ error "too many levels
of symbolic links".

My analysis showed that local_readlink() uses local_open_nofollow() to
open the file and then tries to read it. local_open_nofollow() then
tries to open the file w/ O_NOFOLLOW, which obviously fails if the
requested file is a symlink.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1785902

Title:
  local/9pfs: Too many levels of symbolic links

Status in QEMU:
  New

Bug description:
  Version: 2.9.1

  The primary symptom is resolving symlink fails w/ error "too many
  levels of symbolic links".

  My analysis showed that local_readlink() uses local_open_nofollow() to
  open the file and then tries to read it. local_open_nofollow() then
  tries to open the file w/ O_NOFOLLOW, which obviously fails if the
  requested file is a symlink.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1785902/+subscriptions

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [Bug 1785902] Re: local/9pfs: Too many levels of symbolic links
  2018-08-07 21:28 [Qemu-devel] [Bug 1785902] [NEW] local/9pfs: Too many levels of symbolic links Enrico Weigelt, metux IT consult
@ 2018-08-08  5:39 ` Enrico Weigelt, metux IT consult
  2021-05-02  5:48 ` Thomas Huth
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2018-08-08  5:39 UTC (permalink / raw)
  To: qemu-devel

Turned out that security_model=mapped can't cope with symlinks in the
host file system.

Instead, security_model=passthrough works as expected. OTOH, I'll have
to check, whether this mode already provides a safe chroot, or guest can
escape and damage the host system.

The wiki page needs some more documentation on that:
https://wiki.qemu.org/Documentation/9psetup

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1785902

Title:
  local/9pfs: Too many levels of symbolic links

Status in QEMU:
  New

Bug description:
  Version: 2.9.1

  The primary symptom is resolving symlink fails w/ error "too many
  levels of symbolic links".

  My analysis showed that local_readlink() uses local_open_nofollow() to
  open the file and then tries to read it. local_open_nofollow() then
  tries to open the file w/ O_NOFOLLOW, which obviously fails if the
  requested file is a symlink.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1785902/+subscriptions

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 1785902] Re: local/9pfs: Too many levels of symbolic links
  2018-08-07 21:28 [Qemu-devel] [Bug 1785902] [NEW] local/9pfs: Too many levels of symbolic links Enrico Weigelt, metux IT consult
  2018-08-08  5:39 ` [Qemu-devel] [Bug 1785902] " Enrico Weigelt, metux IT consult
@ 2021-05-02  5:48 ` Thomas Huth
  2021-05-02  9:17 ` Christian Schoenebeck
  2021-07-02  4:17 ` Launchpad Bug Tracker
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2021-05-02  5:48 UTC (permalink / raw)
  To: qemu-devel

The QEMU project is currently considering to move its bug tracking to
another system. For this we need to know which bugs are still valid
and which could be closed already. Thus we are setting older bugs to
"Incomplete" now.

If you still think this bug report here is valid, then please switch
the state back to "New" within the next 60 days, otherwise this report
will be marked as "Expired". Or please mark it as "Fix Released" if
the problem has been solved with a newer version of QEMU already.

Thank you and sorry for the inconvenience.


** Changed in: qemu
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1785902

Title:
  local/9pfs: Too many levels of symbolic links

Status in QEMU:
  Incomplete

Bug description:
  Version: 2.9.1

  The primary symptom is resolving symlink fails w/ error "too many
  levels of symbolic links".

  My analysis showed that local_readlink() uses local_open_nofollow() to
  open the file and then tries to read it. local_open_nofollow() then
  tries to open the file w/ O_NOFOLLOW, which obviously fails if the
  requested file is a symlink.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1785902/+subscriptions


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 1785902] Re: local/9pfs: Too many levels of symbolic links
  2018-08-07 21:28 [Qemu-devel] [Bug 1785902] [NEW] local/9pfs: Too many levels of symbolic links Enrico Weigelt, metux IT consult
  2018-08-08  5:39 ` [Qemu-devel] [Bug 1785902] " Enrico Weigelt, metux IT consult
  2021-05-02  5:48 ` Thomas Huth
@ 2021-05-02  9:17 ` Christian Schoenebeck
  2021-07-02  4:17 ` Launchpad Bug Tracker
  3 siblings, 0 replies; 5+ messages in thread
From: Christian Schoenebeck @ 2021-05-02  9:17 UTC (permalink / raw)
  To: qemu-devel

Enrico, with security_model=mapped (a.k.a. security_model=mapped-xattr)
9p is not following symlinks on host. That's the expected behaviour.

There are 2 distinct models:

security_model=passthrough uses the ownership information, permissions
and symlink info etc. directly from the host's file system. This model
requires the qemu binary to run as high privileged user (i.e. root)
though, because it needs to be able to change file ownership,
permissions and so forth. For that reason this model is only appropriate
for use cases where there is a certain trust to what the guest system is
doing. E.g. this model is commonly used by kernel coders to build
kernel/driver code on host and then test run it as guest.

For untrusted guests (i.e. most cases) it is recommended to use
security_model=mapped-xattr instead. In this mode all ownership
information, permissions, etc. are emulated (i.e. mapped) by storing
them as extended attributes on top of files on host. This way the qemu
binary can run with a regular (unprivileged) user and pretend to host it
would have all rights to change ownership and permissions.

You can read more details about this in the 9p developer description about the 9p 'local' driver here:
https://wiki.qemu.org/Documentation/9p#9p_Filesystem_Drivers

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1785902

Title:
  local/9pfs: Too many levels of symbolic links

Status in QEMU:
  Incomplete

Bug description:
  Version: 2.9.1

  The primary symptom is resolving symlink fails w/ error "too many
  levels of symbolic links".

  My analysis showed that local_readlink() uses local_open_nofollow() to
  open the file and then tries to read it. local_open_nofollow() then
  tries to open the file w/ O_NOFOLLOW, which obviously fails if the
  requested file is a symlink.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1785902/+subscriptions


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 1785902] Re: local/9pfs: Too many levels of symbolic links
  2018-08-07 21:28 [Qemu-devel] [Bug 1785902] [NEW] local/9pfs: Too many levels of symbolic links Enrico Weigelt, metux IT consult
                   ` (2 preceding siblings ...)
  2021-05-02  9:17 ` Christian Schoenebeck
@ 2021-07-02  4:17 ` Launchpad Bug Tracker
  3 siblings, 0 replies; 5+ messages in thread
From: Launchpad Bug Tracker @ 2021-07-02  4:17 UTC (permalink / raw)
  To: qemu-devel

[Expired for QEMU because there has been no activity for 60 days.]

** Changed in: qemu
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1785902

Title:
  local/9pfs: Too many levels of symbolic links

Status in QEMU:
  Expired

Bug description:
  Version: 2.9.1

  The primary symptom is resolving symlink fails w/ error "too many
  levels of symbolic links".

  My analysis showed that local_readlink() uses local_open_nofollow() to
  open the file and then tries to read it. local_open_nofollow() then
  tries to open the file w/ O_NOFOLLOW, which obviously fails if the
  requested file is a symlink.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1785902/+subscriptions


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-02  4:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-07 21:28 [Qemu-devel] [Bug 1785902] [NEW] local/9pfs: Too many levels of symbolic links Enrico Weigelt, metux IT consult
2018-08-08  5:39 ` [Qemu-devel] [Bug 1785902] " Enrico Weigelt, metux IT consult
2021-05-02  5:48 ` Thomas Huth
2021-05-02  9:17 ` Christian Schoenebeck
2021-07-02  4:17 ` Launchpad Bug Tracker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.