From 58d15126b5a002281cfdb180966b4c87c7f3782c3da4bf6bb28753e35d11e98b Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 18 Jun 2010 08:20:40 +0000 Subject: [PATCH 1/5] Accepting request 41594 from home:lnussel:branches:GNOME:Factory Copy from home:lnussel:branches:GNOME:Factory/avahi via accept of submit request 41594 revision 2. Request was accepted with message: Reviewed ok (except we'd prefer seeing the patch name in the .changes file too... I will adjust that). OBS-URL: https://build.opensuse.org/request/show/41594 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/avahi?expand=0&rev=34 --- avahi-0.6.25-fixcrash.diff | 30 ++++++++++++++++++++++++++++++ avahi.changes | 5 +++++ avahi.spec | 3 +++ 3 files changed, 38 insertions(+) create mode 100644 avahi-0.6.25-fixcrash.diff diff --git a/avahi-0.6.25-fixcrash.diff b/avahi-0.6.25-fixcrash.diff new file mode 100644 index 0000000..c879e13 --- /dev/null +++ b/avahi-0.6.25-fixcrash.diff @@ -0,0 +1,30 @@ +From ae19b3039335999e3c06f2bec9ae11ee79b204c1 Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Wed, 19 May 2010 15:43:44 +0200 +Subject: [PATCH] ignore packet if FIONREAD returns zero + +zero size is reported for corrupt packets. recvmsg() later could +nevertheless get data from a good packet that followed the bad one. +So get out early to avoid hitting an assertion. +--- + avahi-core/socket.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/avahi-core/socket.c b/avahi-core/socket.c +index 4146d5a..8b9736a 100644 +--- a/avahi-core/socket.c ++++ b/avahi-core/socket.c +@@ -805,6 +805,10 @@ AvahiDnsPacket *avahi_recv_dns_packet_ipv6( + goto fail; + } + ++ /* corrupt packets have zero size */ ++ if (!ms) ++ goto fail; ++ + p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE); + + io.iov_base = AVAHI_DNS_PACKET_DATA(p); +-- +1.6.4.2 + diff --git a/avahi.changes b/avahi.changes index 8310568..2f7cb2f 100644 --- a/avahi.changes +++ b/avahi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 16 11:19:57 UTC 2010 - lnussel@suse.de + +- avoid crash due to assertion when receiving corrupt packets + ------------------------------------------------------------------- Sat May 1 01:54:24 UTC 2010 - aj@suse.de diff --git a/avahi.spec b/avahi.spec index a13089f..644afbf 100644 --- a/avahi.spec +++ b/avahi.spec @@ -70,6 +70,8 @@ Patch1: avahi-desktop.patch Patch2: avahi-init-lsb.patch #PATCH-FIX-UPSTREAM avahi-empty-share-dir.patch jpr@novell.com -- mailed maintainer Patch3: avahi-empty-share-dir.patch +#PATCH-FIX-UPSTREAM avahi-0.6.25-fixcrash.diff lnussel@suse.de -- mailed maintainer +Patch4: avahi-0.6.25-fixcrash.diff #PATCH-FIX-OPENSUSE avahi-unicastdomains.patch bnc433359 lnussel@suse.de -- disable pre-set unicast domains by default Patch10: avahi-unicastdomains.patch # PATCH-FIX-UPSTREAM avahi-init_unused-not-dead.patch bnc#329708 dimstar@opensuse.org -- Report unused instead of dead @@ -646,6 +648,7 @@ translation-update-upstream %patch1 -p1 %patch2 %patch3 +%patch4 -p1 %patch10 -p1 %patch11 -p1 %if !%build_core From 34fec96097e109e70723a0ed06945842b01441800f3fe3b5320f41f853ec200b Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 18 Jun 2010 08:25:02 +0000 Subject: [PATCH 2/5] Accepting request 41687 from home:dimstar:branches:GNOME:Factory Copy from home:dimstar:branches:GNOME:Factory/avahi via accept of submit request 41687 revision 2. Request was accepted with message: . OBS-URL: https://build.opensuse.org/request/show/41687 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/avahi?expand=0&rev=35 --- avahi.changes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/avahi.changes b/avahi.changes index 2f7cb2f..e4d99ab 100644 --- a/avahi.changes +++ b/avahi.changes @@ -1,7 +1,8 @@ ------------------------------------------------------------------- Wed Jun 16 11:19:57 UTC 2010 - lnussel@suse.de -- avoid crash due to assertion when receiving corrupt packets +- Add avahi-0.6.25-fixcrash.diff: avoid crash due to assertion when + receiving corrupt packets. ------------------------------------------------------------------- Sat May 1 01:54:24 UTC 2010 - aj@suse.de From c8e795d0d213d54a54e2d16d8567aa99f294e1c398e2e98dcadeff6566f55958 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 18 Jun 2010 08:27:13 +0000 Subject: [PATCH 3/5] Accepting request 41688 from home:dimstar:branches:GNOME:Factory Copy from home:dimstar:branches:GNOME:Factory/avahi via accept of submit request 41688 revision 2. Request was accepted with message: OBS-URL: https://build.opensuse.org/request/show/41688 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/avahi?expand=0&rev=36 --- avahi-0.6.25-fixcrash.diff => avahi-0.6.25-fixcrash.patch | 0 avahi.changes | 4 ++-- avahi.spec | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename avahi-0.6.25-fixcrash.diff => avahi-0.6.25-fixcrash.patch (100%) diff --git a/avahi-0.6.25-fixcrash.diff b/avahi-0.6.25-fixcrash.patch similarity index 100% rename from avahi-0.6.25-fixcrash.diff rename to avahi-0.6.25-fixcrash.patch diff --git a/avahi.changes b/avahi.changes index e4d99ab..ba3347c 100644 --- a/avahi.changes +++ b/avahi.changes @@ -1,8 +1,8 @@ ------------------------------------------------------------------- Wed Jun 16 11:19:57 UTC 2010 - lnussel@suse.de -- Add avahi-0.6.25-fixcrash.diff: avoid crash due to assertion when - receiving corrupt packets. +- Add avahi-0.6.25-fixcrash.patch: avoid crash due to assertion + when receiving corrupt packets. ------------------------------------------------------------------- Sat May 1 01:54:24 UTC 2010 - aj@suse.de diff --git a/avahi.spec b/avahi.spec index 644afbf..63e6f6f 100644 --- a/avahi.spec +++ b/avahi.spec @@ -70,8 +70,8 @@ Patch1: avahi-desktop.patch Patch2: avahi-init-lsb.patch #PATCH-FIX-UPSTREAM avahi-empty-share-dir.patch jpr@novell.com -- mailed maintainer Patch3: avahi-empty-share-dir.patch -#PATCH-FIX-UPSTREAM avahi-0.6.25-fixcrash.diff lnussel@suse.de -- mailed maintainer -Patch4: avahi-0.6.25-fixcrash.diff +#PATCH-FIX-UPSTREAM avahi-0.6.25-fixcrash.patch lnussel@suse.de -- mailed maintainer +Patch4: avahi-0.6.25-fixcrash.patch #PATCH-FIX-OPENSUSE avahi-unicastdomains.patch bnc433359 lnussel@suse.de -- disable pre-set unicast domains by default Patch10: avahi-unicastdomains.patch # PATCH-FIX-UPSTREAM avahi-init_unused-not-dead.patch bnc#329708 dimstar@opensuse.org -- Report unused instead of dead From fb2eeaebc78572afc15aea267e4b93a036d7286018a7f286b206a2042f32fd0a Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Mon, 21 Jun 2010 15:43:04 +0000 Subject: [PATCH 4/5] Accepting request 41692 from GNOME:Factory checked in (request 41692) OBS-URL: https://build.opensuse.org/request/show/41692 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/avahi?expand=0&rev=37 --- avahi-0.6.25-fixcrash.patch | 30 ------------------------------ avahi.changes | 6 ------ avahi.spec | 3 --- 3 files changed, 39 deletions(-) delete mode 100644 avahi-0.6.25-fixcrash.patch diff --git a/avahi-0.6.25-fixcrash.patch b/avahi-0.6.25-fixcrash.patch deleted file mode 100644 index c879e13..0000000 --- a/avahi-0.6.25-fixcrash.patch +++ /dev/null @@ -1,30 +0,0 @@ -From ae19b3039335999e3c06f2bec9ae11ee79b204c1 Mon Sep 17 00:00:00 2001 -From: Ludwig Nussel -Date: Wed, 19 May 2010 15:43:44 +0200 -Subject: [PATCH] ignore packet if FIONREAD returns zero - -zero size is reported for corrupt packets. recvmsg() later could -nevertheless get data from a good packet that followed the bad one. -So get out early to avoid hitting an assertion. ---- - avahi-core/socket.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/avahi-core/socket.c b/avahi-core/socket.c -index 4146d5a..8b9736a 100644 ---- a/avahi-core/socket.c -+++ b/avahi-core/socket.c -@@ -805,6 +805,10 @@ AvahiDnsPacket *avahi_recv_dns_packet_ipv6( - goto fail; - } - -+ /* corrupt packets have zero size */ -+ if (!ms) -+ goto fail; -+ - p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE); - - io.iov_base = AVAHI_DNS_PACKET_DATA(p); --- -1.6.4.2 - diff --git a/avahi.changes b/avahi.changes index ba3347c..8310568 100644 --- a/avahi.changes +++ b/avahi.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Wed Jun 16 11:19:57 UTC 2010 - lnussel@suse.de - -- Add avahi-0.6.25-fixcrash.patch: avoid crash due to assertion - when receiving corrupt packets. - ------------------------------------------------------------------- Sat May 1 01:54:24 UTC 2010 - aj@suse.de diff --git a/avahi.spec b/avahi.spec index 63e6f6f..a13089f 100644 --- a/avahi.spec +++ b/avahi.spec @@ -70,8 +70,6 @@ Patch1: avahi-desktop.patch Patch2: avahi-init-lsb.patch #PATCH-FIX-UPSTREAM avahi-empty-share-dir.patch jpr@novell.com -- mailed maintainer Patch3: avahi-empty-share-dir.patch -#PATCH-FIX-UPSTREAM avahi-0.6.25-fixcrash.patch lnussel@suse.de -- mailed maintainer -Patch4: avahi-0.6.25-fixcrash.patch #PATCH-FIX-OPENSUSE avahi-unicastdomains.patch bnc433359 lnussel@suse.de -- disable pre-set unicast domains by default Patch10: avahi-unicastdomains.patch # PATCH-FIX-UPSTREAM avahi-init_unused-not-dead.patch bnc#329708 dimstar@opensuse.org -- Report unused instead of dead @@ -648,7 +646,6 @@ translation-update-upstream %patch1 -p1 %patch2 %patch3 -%patch4 -p1 %patch10 -p1 %patch11 -p1 %if !%build_core From 589e6b3a6ddc06a17e20eae4713ea2c69bbb466618e062e3a0688bea4c4c7218 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Mon, 21 Jun 2010 15:43:05 +0000 Subject: [PATCH 5/5] Updating link to change in openSUSE:Factory/avahi revision 63.0 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/avahi?expand=0&rev=b757ba0a4ded298d7188e6ed5818083f --- avahi-0.6.25-fixcrash.patch | 30 ++++++++++++++++++++++++++++++ avahi-glib2.spec | 5 ++++- avahi-mono.spec | 5 ++++- avahi-qt4.spec | 5 ++++- avahi.changes | 6 ++++++ avahi.spec | 5 ++++- 6 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 avahi-0.6.25-fixcrash.patch diff --git a/avahi-0.6.25-fixcrash.patch b/avahi-0.6.25-fixcrash.patch new file mode 100644 index 0000000..c879e13 --- /dev/null +++ b/avahi-0.6.25-fixcrash.patch @@ -0,0 +1,30 @@ +From ae19b3039335999e3c06f2bec9ae11ee79b204c1 Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Wed, 19 May 2010 15:43:44 +0200 +Subject: [PATCH] ignore packet if FIONREAD returns zero + +zero size is reported for corrupt packets. recvmsg() later could +nevertheless get data from a good packet that followed the bad one. +So get out early to avoid hitting an assertion. +--- + avahi-core/socket.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/avahi-core/socket.c b/avahi-core/socket.c +index 4146d5a..8b9736a 100644 +--- a/avahi-core/socket.c ++++ b/avahi-core/socket.c +@@ -805,6 +805,10 @@ AvahiDnsPacket *avahi_recv_dns_packet_ipv6( + goto fail; + } + ++ /* corrupt packets have zero size */ ++ if (!ms) ++ goto fail; ++ + p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE); + + io.iov_base = AVAHI_DNS_PACKET_DATA(p); +-- +1.6.4.2 + diff --git a/avahi-glib2.spec b/avahi-glib2.spec index 5e67c24..12b3251 100644 --- a/avahi-glib2.spec +++ b/avahi-glib2.spec @@ -31,7 +31,7 @@ Name: avahi-glib2 %define build_qt3 0 %define build_qt4 0 Version: 0.6.25 -Release: 8 +Release: 9 %if !%build_glib2 && !%build_mono && !%build_qt3 && !%build_qt4 # Create split spec files only when building per partes: #%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name}) @@ -68,6 +68,8 @@ Patch1: avahi-desktop.patch Patch2: avahi-init-lsb.patch #PATCH-FIX-UPSTREAM avahi-empty-share-dir.patch jpr@novell.com -- mailed maintainer Patch3: avahi-empty-share-dir.patch +#PATCH-FIX-UPSTREAM avahi-0.6.25-fixcrash.patch lnussel@suse.de -- mailed maintainer +Patch4: avahi-0.6.25-fixcrash.patch #PATCH-FIX-OPENSUSE avahi-unicastdomains.patch bnc433359 lnussel@suse.de -- disable pre-set unicast domains by default Patch10: avahi-unicastdomains.patch # PATCH-FIX-UPSTREAM avahi-init_unused-not-dead.patch bnc#329708 dimstar@opensuse.org -- Report unused instead of dead @@ -644,6 +646,7 @@ translation-update-upstream %patch1 -p1 %patch2 %patch3 +%patch4 -p1 %patch10 -p1 %patch11 -p1 %if !%build_core diff --git a/avahi-mono.spec b/avahi-mono.spec index e4e753b..6368318 100644 --- a/avahi-mono.spec +++ b/avahi-mono.spec @@ -31,7 +31,7 @@ Name: avahi-mono %define build_qt3 0 %define build_qt4 0 Version: 0.6.25 -Release: 8 +Release: 9 %if !%build_glib2 && !%build_mono && !%build_qt3 && !%build_qt4 # Create split spec files only when building per partes: #%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name}) @@ -68,6 +68,8 @@ Patch1: avahi-desktop.patch Patch2: avahi-init-lsb.patch #PATCH-FIX-UPSTREAM avahi-empty-share-dir.patch jpr@novell.com -- mailed maintainer Patch3: avahi-empty-share-dir.patch +#PATCH-FIX-UPSTREAM avahi-0.6.25-fixcrash.patch lnussel@suse.de -- mailed maintainer +Patch4: avahi-0.6.25-fixcrash.patch #PATCH-FIX-OPENSUSE avahi-unicastdomains.patch bnc433359 lnussel@suse.de -- disable pre-set unicast domains by default Patch10: avahi-unicastdomains.patch # PATCH-FIX-UPSTREAM avahi-init_unused-not-dead.patch bnc#329708 dimstar@opensuse.org -- Report unused instead of dead @@ -643,6 +645,7 @@ translation-update-upstream %patch1 -p1 %patch2 %patch3 +%patch4 -p1 %patch10 -p1 %patch11 -p1 %if !%build_core diff --git a/avahi-qt4.spec b/avahi-qt4.spec index 2b58c91..8596263 100644 --- a/avahi-qt4.spec +++ b/avahi-qt4.spec @@ -31,7 +31,7 @@ Name: avahi-qt4 %define build_qt3 0 %define build_qt4 1 Version: 0.6.25 -Release: 8 +Release: 9 %if !%build_glib2 && !%build_mono && !%build_qt3 && !%build_qt4 # Create split spec files only when building per partes: #%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name}) @@ -68,6 +68,8 @@ Patch1: avahi-desktop.patch Patch2: avahi-init-lsb.patch #PATCH-FIX-UPSTREAM avahi-empty-share-dir.patch jpr@novell.com -- mailed maintainer Patch3: avahi-empty-share-dir.patch +#PATCH-FIX-UPSTREAM avahi-0.6.25-fixcrash.patch lnussel@suse.de -- mailed maintainer +Patch4: avahi-0.6.25-fixcrash.patch #PATCH-FIX-OPENSUSE avahi-unicastdomains.patch bnc433359 lnussel@suse.de -- disable pre-set unicast domains by default Patch10: avahi-unicastdomains.patch # PATCH-FIX-UPSTREAM avahi-init_unused-not-dead.patch bnc#329708 dimstar@opensuse.org -- Report unused instead of dead @@ -646,6 +648,7 @@ translation-update-upstream %patch1 -p1 %patch2 %patch3 +%patch4 -p1 %patch10 -p1 %patch11 -p1 %if !%build_core diff --git a/avahi.changes b/avahi.changes index 8310568..ba3347c 100644 --- a/avahi.changes +++ b/avahi.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 16 11:19:57 UTC 2010 - lnussel@suse.de + +- Add avahi-0.6.25-fixcrash.patch: avoid crash due to assertion + when receiving corrupt packets. + ------------------------------------------------------------------- Sat May 1 01:54:24 UTC 2010 - aj@suse.de diff --git a/avahi.spec b/avahi.spec index a13089f..f0c9b56 100644 --- a/avahi.spec +++ b/avahi.spec @@ -33,7 +33,7 @@ Name: avahi %define build_qt3 0 %define build_qt4 0 Version: 0.6.25 -Release: 8 +Release: 9 %if !%build_glib2 && !%build_mono && !%build_qt3 && !%build_qt4 # Create split spec files only when building per partes: #%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name}) @@ -70,6 +70,8 @@ Patch1: avahi-desktop.patch Patch2: avahi-init-lsb.patch #PATCH-FIX-UPSTREAM avahi-empty-share-dir.patch jpr@novell.com -- mailed maintainer Patch3: avahi-empty-share-dir.patch +#PATCH-FIX-UPSTREAM avahi-0.6.25-fixcrash.patch lnussel@suse.de -- mailed maintainer +Patch4: avahi-0.6.25-fixcrash.patch #PATCH-FIX-OPENSUSE avahi-unicastdomains.patch bnc433359 lnussel@suse.de -- disable pre-set unicast domains by default Patch10: avahi-unicastdomains.patch # PATCH-FIX-UPSTREAM avahi-init_unused-not-dead.patch bnc#329708 dimstar@opensuse.org -- Report unused instead of dead @@ -646,6 +648,7 @@ translation-update-upstream %patch1 -p1 %patch2 %patch3 +%patch4 -p1 %patch10 -p1 %patch11 -p1 %if !%build_core