[Top][All Lists]

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

[Qemu-commits] [qemu/qemu] 96bae1: 9pfs: local: set the path of the expo

From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 96bae1: 9pfs: local: set the path of the export root to "....
Date: Thu, 20 Apr 2017 16:06:21 -0700

  Branch: refs/heads/stable-2.8
  Home:   https://github.com/qemu/qemu
  Commit: 96bae145e27d4df62671b4eebd6c735f412016cf
  Author: Greg Kurz <address@hidden>
  Date:   2017-04-20 (Thu, 20 Apr 2017)

  Changed paths:
    M hw/9pfs/9p-local.c

  Log Message:
  9pfs: local: set the path of the export root to "."

The local backend was recently converted to using "at*()" syscalls in order
to ensure all accesses happen below the shared directory. This requires that
we only pass relative paths, otherwise the dirfd argument to the "at*()"
syscalls is ignored and the path is treated as an absolute path in the host.
This is actually the case for paths in all fids, with the notable exception
of the root fid, whose path is "/". This causes the following backend ops to
act on the "/" directory of the host instead of the virtfs shared directory
when the export root is involved:
- lstat
- chmod
- chown
- utimensat

ie, chmod /9p_mount_point in the guest will be converted to chmod / in the
host for example. This could cause security issues with a privileged QEMU.

All "*at()" syscalls are being passed an open file descriptor. In the case
of the export root, this file descriptor points to the path in the host that
was passed to -fsdev.

The fix is thus as simple as changing the path of the export root fid to be
"." instead of "/".

This is CVE-2017-7471.

Cc: address@hidden
Reported-by: Léo Gaspard <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
(cherry picked from commit 9c6b899f7a46893ab3b671e341a2234e9c0c060e)
Signed-off-by: Michael Roth <address@hidden>

  Commit: d1b725ee12539906b72777fde1f6c73c2273d806
  Author: Michael Roth <address@hidden>
  Date:   2017-04-20 (Thu, 20 Apr 2017)

  Changed paths:

  Log Message:
  Update version for release

Signed-off-by: Michael Roth <address@hidden>

Compare: https://github.com/qemu/qemu/compare/7124ccf8b397...d1b725ee1253

reply via email to

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