[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] e6b636: Add -f FMT / --format FMT arg to qemu
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] e6b636: Add -f FMT / --format FMT arg to qemu-nbd |
Date: |
Mon, 15 Apr 2013 13:30:10 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: e6b636779b51c97e67694be740ee972c52460c59
https://github.com/qemu/qemu/commit/e6b636779b51c97e67694be740ee972c52460c59
Author: Daniel P. Berrange <address@hidden>
Date: 2013-04-15 (Mon, 15 Apr 2013)
Changed paths:
M qemu-nbd.c
M qemu-nbd.texi
Log Message:
-----------
Add -f FMT / --format FMT arg to qemu-nbd
Currently the qemu-nbd program will auto-detect the format of
any disk it is given. This behaviour is known to be insecure.
For example, if qemu-nbd initially exposes a 'raw' file to an
unprivileged app, and that app runs
'qemu-img create -f qcow2 -o backing_file=/etc/shadow /dev/nbd0'
then the next time the app is started, the qemu-nbd will now
detect it as a 'qcow2' file and expose /etc/shadow to the
unprivileged app.
The only way to avoid this is to explicitly tell qemu-nbd what
disk format to use on the command line, completely disabling
auto-detection. This patch adds a '-f' / '--format' arg for
this purpose, mirroring what is already available via qemu-img
and qemu commands.
qemu-nbd --format raw -p 9000 evil.img
will now always use raw, regardless of what format 'evil.img'
looks like it contains
Signed-off-by: Daniel P. Berrange <address@hidden>
[Use errx, not err. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] e6b636: Add -f FMT / --format FMT arg to qemu-nbd,
GitHub <=