Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
qemu.19028
0242-qemu-nbd-Ignore-SIGPIPE.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0242-qemu-nbd-Ignore-SIGPIPE.patch of Package qemu.19028
From: Max Reitz <mreitz@redhat.com> Date: Sun, 11 Jun 2017 14:37:14 +0200 Subject: qemu-nbd: Ignore SIGPIPE qemu proper has done so for 13 years (8a7ddc38a60648257dc0645ab4a05b33d6040063), qemu-img and qemu-io have done so for four years (526eda14a68d5b3596be715505289b541288ef2a). Ignoring this signal is especially important in qemu-nbd because otherwise a client can easily take down the qemu-nbd server by dropping the connection when the server wants to send something, for example: $ qemu-nbd -x foo -f raw -t null-co:// & [1] 12726 $ qemu-io -c quit nbd://localhost/bar can't open device nbd://localhost/bar: No export with name 'bar' available [1] + 12726 broken pipe qemu-nbd -x foo -f raw -t null-co:// In this case, the client sends an NBD_OPT_ABORT and closes the connection (because it is not required to wait for a reply), but the server replies with an NBD_REP_ACK (because it is required to reply). Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20170611123714.31292-1-mreitz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit 041e32b8d9d076980b4e35317c0339e57ab888f1) [FL: BSC#1046636 CVE-2017-10664] Signed-off-by: Fei Li <fli@suse.com> --- qemu-nbd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qemu-nbd.c b/qemu-nbd.c index 0b5e8e5a261666688ac4cf7e47ac..7293e9578149136e92293e17e7e7 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -521,6 +521,10 @@ int main(int argc, char **argv) sa_sigterm.sa_handler = termsig_handler; sigaction(SIGTERM, &sa_sigterm, NULL); +#ifdef CONFIG_POSIX + signal(SIGPIPE, SIG_IGN); +#endif + if (qcrypto_init(&local_err) < 0) { error_reportf_err(local_err, "cannot initialize crypto: "); exit(1);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor