[perl-Socket/f17] Fix invalid write while unpacking AF_UNIX sockaddr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 6c2d1e650977c0909380f75011dad3c9c21d67c0
Author: Petr Písař <ppisar@xxxxxxxxxx>
Date:   Tue Mar 27 09:31:13 2012 +0200

    Fix invalid write while unpacking AF_UNIX sockaddr

 ...x-AF_UNIX-sockaddr-padding-initialization.patch |   26 ++++++++++++++++++++
 perl-Socket.spec                                   |    8 +++++-
 2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/Socket-2.000-Fix-AF_UNIX-sockaddr-padding-initialization.patch b/Socket-2.000-Fix-AF_UNIX-sockaddr-padding-initialization.patch
new file mode 100644
index 0000000..4d8a260
--- /dev/null
+++ b/Socket-2.000-Fix-AF_UNIX-sockaddr-padding-initialization.patch
@@ -0,0 +1,26 @@
+From f76970735bf4f9b2587d109aff732cd5a28b01ab Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@xxxxxxxxxx>
+Date: Tue, 27 Mar 2012 09:26:40 +0200
+Subject: [PATCH] Fix AF_UNIX sockaddr padding initialization
+
+<http://rt.cpan.org/Public/Bug/Display.html?id=76067>.
+---
+ Socket.xs |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Socket.xs b/Socket.xs
+index 3999c4b..fc0b39a 100644
+--- a/Socket.xs
++++ b/Socket.xs
+@@ -712,7 +712,7 @@ unpack_sockaddr_un(sun_sv)
+ 	   getpeername and getsockname is not equal to sizeof(addr). */
+ 	if (sockaddrlen < sizeof(addr)) {
+ 	  Copy(sun_ad, &addr, sockaddrlen, char);
+-	  Zero(&addr+sockaddrlen, sizeof(addr)-sockaddrlen, char);
++	  Zero(((char*)&addr)+sockaddrlen, sizeof(addr)-sockaddrlen, char);
+ 	} else {
+ 	  Copy(sun_ad, &addr, sizeof(addr), char);
+ 	}
+-- 
+1.7.9.3
+
diff --git a/perl-Socket.spec b/perl-Socket.spec
index ea2ccfc..e0d3373 100644
--- a/perl-Socket.spec
+++ b/perl-Socket.spec
@@ -1,12 +1,14 @@
 %global cpan_version 2.000
 Name:           perl-Socket
 Version:        %(eval echo '%{cpan_version}' | tr '_' '.')
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        C socket.h defines and structure manipulators
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Socket/
 Source0:        http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/Socket-%{cpan_version}.tar.gz
+# Bug #806543, CPAN RT#76067
+Patch0:         Socket-2.000-Fix-AF_UNIX-sockaddr-padding-initialization.patch
 BuildRequires:  perl(ExtUtils::MakeMaker)
 BuildRequires:  perl(ExtUtils::CBuilder)
 BuildRequires:  perl(ExtUtils::Constant) >= 0.23
@@ -30,6 +32,7 @@ includes all of the commonly used pound-defines like AF_INET, SOCK_STREAM, etc.
 
 %prep
 %setup -q -n Socket-%{cpan_version}
+%patch0 -p1
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
@@ -52,6 +55,9 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Tue Mar 27 2012 Petr Pisar <ppisar@xxxxxxxxxx> - 2.000-3
+- Fix invalid write while unpacking AF_UNIX sockaddr (bug #806543)
+
 * Wed Mar 14 2012 Petr Pisar <ppisar@xxxxxxxxxx> - 2.000-2
 - 2.000 bump
 - Fix a buffer overflow (RT#75623)
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel



[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux