CVE-2013-2168: _dbus_printf_string_upper_bound: copy the va_list for each use
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 10 Jun 2013 17:06:47 +0000 (18:06 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 12 Jun 2013 12:55:53 +0000 (13:55 +0100)
commit954d75b2b64e4799f360d2a6bf9cff6d9fee37e7
treeb2ce9ace5bc08528c4c1df851147f865159ac056
parent355b470da78e25cb451eab0c49f30437b2c5ccb9
CVE-2013-2168: _dbus_printf_string_upper_bound: copy the va_list for each use

Using a va_list more than once is non-portable: it happens to work
under the ABI of (for instance) x86 Linux, but not x86-64 Linux.

This led to _dbus_printf_string_upper_bound() crashing if it should
have returned exactly 1024 bytes. Many system services can be induced
to process a caller-controlled string in ways that
end up using _dbus_printf_string_upper_bound(), so this is a denial of
service.

Reviewed-by: Thiago Macieira <thiago@kde.org>
dbus/dbus-sysdeps-unix.c
dbus/dbus-sysdeps-win.c