Bugzilla – Bug 848279
VUL-0: CVE-2013-4282: spice: buffer overflow in password handling
Last modified: 2017-02-13 10:01:24 UTC
CVE-2013-4282, via rh bugzilla and linux-distros From 3554c19d1c65c2bc4ae8cadb7296256c03215257 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau <cfergeau@redhat.com> Subject: [PATCH] Fix buffer overflow when decrypting client SPICE ticket reds_handle_ticket uses a fixed size 'password' buffer for the decrypted password whose size is SPICE_MAX_PASSWORD_LENGTH. However, RSA_private_decrypt which we call for the decryption expects the destination buffer to be at least RSA_size(link->tiTicketing.rsa) bytes long. On my spice-server build, SPICE_MAX_PASSWORD_LENGTH is 60 while RSA_size() is 128, so we end up overflowing 'password' when using long passwords (this was reproduced using the string: 'fullscreen=1proxy=#enter proxy here; e.g spice_proxy = http://[proxy]:[port]' as a password). When the overflow occurs, QEMU dies with: *** stack smashing detected ***: qemu-system-x86_64 terminated This commit ensures we use a corectly sized 'password' buffer, and that it's correctly nul-terminated so that we can use strcmp instead of strncmp. To keep using strncmp, we'd need to figure out which one of 'password' and 'taTicket.password' is the smaller buffer, and use that size. --- server/reds.c | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) (rest of the patch attached) References: https://bugzilla.redhat.com/show_bug.cgi?id=1000443
bugbot adjusting priority
this is the fix http://cgit.freedesktop.org/spice/spice/commit/?id=8af619009660b24e0b41ad26b30289eea288fcc2http://cgit.freedesktop.org/spice/spice/commit/?id=8af619009660b24e0b41ad26b30289eea288fcc2 SLE 12 needs to be fixed, please submit
Maintenance request created with the added patch: #54492
SUSE-SU-2015:0884-1: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 848279 CVE References: CVE-2013-4282 Sources used: SUSE Linux Enterprise Server 12 (src): spice-0.12.4-6.1 SUSE Linux Enterprise Desktop 12 (src): spice-0.12.4-6.1
SUSE-SU-2015:0884-2: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 848279 CVE References: CVE-2013-4282 Sources used: SUSE Linux Enterprise Software Development Kit 12 (src): spice-0.12.4-6.1
Seems like all affected dists have been released (SLE12). closing
openSUSE-SU-2015:1750-1: An update that fixes four vulnerabilities is now available. Category: security (moderate) Bug References: 848279,944460,944787,948976 CVE References: CVE-2013-4282,CVE-2015-3247,CVE-2015-5260,CVE-2015-5261 Sources used: openSUSE 13.2 (src): spice-0.12.4-4.6.1 openSUSE 13.1 (src): spice-0.12.4-2.3.1
This is an autogenerated message for OBS integration: This bug (848279) was mentioned in https://build.opensuse.org/request/show/454133 Factory / spice