Hello community, here is the log from the commit of package dbus-1 for openSUSE:11.3 checked in at Tue Apr 26 14:32:57 CEST 2011. -------- --- old-versions/11.3/all/dbus-1/dbus-1-x11.changes 2010-03-25 15:54:36.000000000 +0100 +++ 11.3/dbus-1/dbus-1-x11.changes 2011-03-30 17:48:41.000000000 +0200 @@ -1,0 +2,5 @@ +Wed Mar 30 15:01:59 CEST 2011 - thoenig@suse.de + +- add patch dbus-stackoverflow.patch (bnc#659934) + +------------------------------------------------------------------- dbus-1.changes: same change Package does not exist at destination yet. Using Fallback old-versions/11.3/all/dbus-1 Destination is old-versions/11.3/UPDATES/all/dbus-1 calling whatdependson for 11.3-i586 New: ---- dbus-stackoverflow.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dbus-1-x11.spec ++++++ --- /var/tmp/diff_new_pack.Kh0OYD/_old 2011-04-26 14:32:38.000000000 +0200 +++ /var/tmp/diff_new_pack.Kh0OYD/_new 2011-04-26 14:32:38.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package dbus-1-x11 (Version 1.2.24) +# spec file for package dbus-1-x11 # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,7 +29,7 @@ BuildRequires: doxygen libexpat-devel libzio pkgconfig BuildRequires: audit-devel Version: 1.2.24 -Release: 1 +Release: 2.<RELEASE2> AutoReqProv: on # bug437293 %ifarch ppc64 @@ -42,6 +42,7 @@ Source3: dbus_at_console.ck Source4: baselibs.conf Patch0: dbus-log-deny.patch +Patch1: dbus-stackoverflow.patch %if 0%{?suse_version} > 1100 %bcond_without selinux %else @@ -63,6 +64,7 @@ # COMMON2-BEGIN %setup -n dbus-%{version} -q %patch0 -p1 +%patch1 -p1 %build autoreconf -fi ++++++ dbus-1.spec ++++++ --- /var/tmp/diff_new_pack.Kh0OYD/_old 2011-04-26 14:32:38.000000000 +0200 +++ /var/tmp/diff_new_pack.Kh0OYD/_new 2011-04-26 14:32:38.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package dbus-1 (Version 1.2.24) +# spec file for package dbus-1 # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,14 +20,14 @@ Name: dbus-1 Url: http://dbus.freedesktop.org/ -License: Dual GPLv2 or AFLv2.1 +License: Other uncritical OpenSource License Group: System/Daemons Summary: D-Bus Message Bus System # COMMON1-BEGIN BuildRequires: doxygen libexpat-devel libzio pkgconfig BuildRequires: audit-devel Version: 1.2.24 -Release: 1 +Release: 2.<RELEASE2> AutoReqProv: on # bug437293 %ifarch ppc64 @@ -40,6 +40,7 @@ Source3: dbus_at_console.ck Source4: baselibs.conf Patch0: dbus-log-deny.patch +Patch1: dbus-stackoverflow.patch %if 0%{?suse_version} > 1100 %bcond_without selinux %else @@ -97,6 +98,7 @@ # COMMON2-BEGIN %setup -n dbus-%{version} -q %patch0 -p1 +%patch1 -p1 %build autoreconf -fi ++++++ dbus-stackoverflow.patch ++++++ Index: dbus-1.2.24/dbus/dbus-marshal-validate.c =================================================================== --- dbus-1.2.24.orig/dbus/dbus-marshal-validate.c +++ dbus-1.2.24/dbus/dbus-marshal-validate.c @@ -289,16 +289,30 @@ out: return result; } +/* note: this function is also used to validate the header's values, + * since the header is a valid body with a particular signature. + */ static DBusValidity validate_body_helper (DBusTypeReader *reader, int byte_order, dbus_bool_t walk_reader_to_end, + int total_depth, const unsigned char *p, const unsigned char *end, const unsigned char **new_p) { int current_type; + /* The spec allows arrays and structs to each nest 32, for total + * nesting of 2*32. We want to impose the same limit on "dynamic" + * value nesting (not visible in the signature) which is introduced + * by DBUS_TYPE_VARIANT. + */ + if (total_depth > (DBUS_MAXIMUM_TYPE_RECURSION_DEPTH * 2)) + { + return DBUS_INVALID_NESTED_TOO_DEEPLY; + } + while ((current_type = _dbus_type_reader_get_current_type (reader)) != DBUS_TYPE_INVALID) { const unsigned char *a; @@ -474,7 +488,9 @@ validate_body_helper (DBusTypeReader { while (p < array_end) { - validity = validate_body_helper (&sub, byte_order, FALSE, p, end, &p); + validity = validate_body_helper (&sub, byte_order, FALSE, + total_depth + 1, + p, end, &p); if (validity != DBUS_VALID) return validity; } @@ -591,7 +607,9 @@ validate_body_helper (DBusTypeReader _dbus_assert (_dbus_type_reader_get_current_type (&sub) != DBUS_TYPE_INVALID); - validity = validate_body_helper (&sub, byte_order, FALSE, p, end, &p); + validity = validate_body_helper (&sub, byte_order, FALSE, + total_depth + 1, + p, end, &p); if (validity != DBUS_VALID) return validity; @@ -620,7 +638,9 @@ validate_body_helper (DBusTypeReader _dbus_type_reader_recurse (reader, &sub); - validity = validate_body_helper (&sub, byte_order, TRUE, p, end, &p); + validity = validate_body_helper (&sub, byte_order, TRUE, + total_depth + 1, + p, end, &p); if (validity != DBUS_VALID) return validity; } @@ -705,7 +725,7 @@ _dbus_validate_body_with_reason (const D p = _dbus_string_get_const_data_len (value_str, value_pos, len); end = p + len; - validity = validate_body_helper (&reader, byte_order, TRUE, p, end, &p); + validity = validate_body_helper (&reader, byte_order, TRUE, 0, p, end, &p); if (validity != DBUS_VALID) return validity; @@ -875,7 +895,7 @@ _dbus_validity_to_error_message (DBusVal case DBUS_INVALID_DICT_ENTRY_HAS_TOO_MANY_FIELDS: return "Dict entry has too many fields"; case DBUS_INVALID_DICT_ENTRY_NOT_INSIDE_ARRAY: return "Dict entry not inside array"; case DBUS_INVALID_DICT_KEY_MUST_BE_BASIC_TYPE: return "Dict key must be basic type"; - + case DBUS_INVALID_NESTED_TOO_DEEPLY: return "Variants cannot be used to create a hugely recursive tree of values"; default: return "Invalid"; } Index: dbus-1.2.24/dbus/dbus-marshal-validate.h =================================================================== --- dbus-1.2.24.orig/dbus/dbus-marshal-validate.h +++ dbus-1.2.24/dbus/dbus-marshal-validate.h @@ -117,6 +117,8 @@ typedef enum DBUS_INVALID_DICT_ENTRY_HAS_TOO_MANY_FIELDS = 53, DBUS_INVALID_DICT_ENTRY_NOT_INSIDE_ARRAY = 54, DBUS_INVALID_DICT_KEY_MUST_BE_BASIC_TYPE = 55, + DBUS_INVALID_MISSING_UNIX_FDS = 56, + DBUS_INVALID_NESTED_TOO_DEEPLY = 57, DBUS_VALIDITY_LAST } DBusValidity; Index: dbus-1.2.24/dbus/dbus-message-factory.c =================================================================== --- dbus-1.2.24.orig/dbus/dbus-message-factory.c +++ dbus-1.2.24/dbus/dbus-message-factory.c @@ -333,6 +333,53 @@ simple_error (void) return message; } +static DBusMessage* +message_with_nesting_levels (int levels) +{ + DBusMessage *message; + dbus_int32_t v_INT32; + DBusMessageIter *parents; + DBusMessageIter *children; + int i; + + /* If levels is higher it breaks sig_refcount in DBusMessageRealIter + * in dbus-message.c, this assert is just to help you know you need + * to fix that if you hit it + */ + _dbus_assert (levels < 256); + + parents = dbus_new(DBusMessageIter, levels + 1); + children = dbus_new(DBusMessageIter, levels + 1); + + v_INT32 = 42; + message = simple_method_call (); + + i = 0; + dbus_message_iter_init_append (message, &parents[i]); + while (i < levels) + { + dbus_message_iter_open_container (&parents[i], DBUS_TYPE_VARIANT, + i == (levels - 1) ? + DBUS_TYPE_INT32_AS_STRING : + DBUS_TYPE_VARIANT_AS_STRING, + &children[i]); + ++i; + parents[i] = children[i-1]; + } + --i; + dbus_message_iter_append_basic (&children[i], DBUS_TYPE_INT32, &v_INT32); + while (i >= 0) + { + dbus_message_iter_close_container (&parents[i], &children[i]); + --i; + } + + dbus_free(parents); + dbus_free(children); + + return message; +} + static dbus_bool_t generate_special (DBusMessageDataIter *iter, DBusString *data, @@ -735,6 +782,24 @@ generate_special (DBusMessageDataIter *expected_validity = DBUS_INVALID_DICT_ENTRY_HAS_NO_FIELDS; } + else if (item_seq == 20) + { + /* 64 levels of nesting is OK */ + message = message_with_nesting_levels(64); + + generate_from_message (data, expected_validity, message); + + *expected_validity = DBUS_VALID; + } + else if (item_seq == 21) + { + /* 65 levels of nesting is not OK */ + message = message_with_nesting_levels(65); + + generate_from_message (data, expected_validity, message); + + *expected_validity = DBUS_INVALID_NESTED_TOO_DEEPLY; + } else { return FALSE; Index: dbus-1.2.24/doc/dbus-specification.xml =================================================================== --- dbus-1.2.24.orig/doc/dbus-specification.xml +++ dbus-1.2.24/doc/dbus-specification.xml @@ -561,12 +561,14 @@ </row><row> <entry><literal>VARIANT</literal></entry> <entry> - A variant type has a marshaled <literal>SIGNATURE</literal> - followed by a marshaled value with the type - given in the signature. - Unlike a message signature, the variant signature - can contain only a single complete type. - So "i", "ai" or "(ii)" is OK, but "ii" is not. + A variant type has a marshaled + <literal>SIGNATURE</literal> followed by a marshaled + value with the type given in the signature. Unlike + a message signature, the variant signature can + contain only a single complete type. So "i", "ai" + or "(ii)" is OK, but "ii" is not. Use of variants may not + cause a total message depth to be larger than 64, including + other container types such as structures. </entry> <entry> 1 (alignment of the signature) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org