rpms/quota/F-12 quota-3.17-quotactl_null_corruption.patch, NONE, 1.1 quota.spec, 1.58, 1.59

Petr Pisar ppisar at fedoraproject.org
Mon May 10 15:49:14 UTC 2010


Author: ppisar

Update of /cvs/pkgs/rpms/quota/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv17415

Modified Files:
	quota.spec 
Added Files:
	quota-3.17-quotactl_null_corruption.patch 
Log Message:
Resolves: #528581 - avoid NULL dereference in kernel

quota-3.17-quotactl_null_corruption.patch:
 quotasys.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- NEW FILE quota-3.17-quotactl_null_corruption.patch ---
Avoid memory corruption of NULL address.

Backport of
<https://sourceforge.net/tracker/?func=detail&aid=2996418&group_id=18136&atid=118136>
and n+2nd CVS commit.

diff --git a/quotasys.c b/quotasys.c
index 9a7f440..0a4a609 100644
--- a/quotasys.c
+++ b/quotasys.c
@@ -707,9 +707,12 @@ void init_kernel_interface(void)
 	kernel_formats = 0;
 	if (!stat("/proc/fs/xfs/stat", &st))
 		kernel_formats |= (1 << QF_XFS);
-	else
-		if (!quotactl(QCMD(Q_XGETQSTAT, 0), NULL, 0, NULL) || (errno != EINVAL && errno != ENOSYS))
+	else {
+		fs_quota_stat_t dummy;
+
+		if (!quotactl(QCMD(Q_XGETQSTAT, 0), "/dev/root", 0, (void *)&dummy) || (errno != EINVAL && errno != ENOSYS))
 			kernel_formats |= (1 << QF_XFS);
+	}
 	/* Detect new kernel interface; Assume generic interface unless we can prove there is not one... */
 	if (!stat("/proc/sys/fs/quota", &st) || errno != ENOENT) {
 		kernel_iface = IFACE_GENERIC;


Index: quota.spec
===================================================================
RCS file: /cvs/pkgs/rpms/quota/F-12/quota.spec,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -p -r1.58 -r1.59
--- quota.spec	30 Sep 2009 10:13:13 -0000	1.58
+++ quota.spec	10 May 2010 15:49:13 -0000	1.59
@@ -5,7 +5,7 @@ Name: quota
 Summary: System administration tools for monitoring users' disk usage
 Epoch: 1
 Version: 3.17
-Release: 8%{?dist}
+Release: 9%{?dist}
 License: BSD and GPLv2+
 URL: http://sourceforge.net/projects/linuxquota/
 Group: System Environment/Base
@@ -15,7 +15,7 @@ Conflicts: kernel < 2.4
 BuildRequires: e2fsprogs-devel gettext tcp_wrappers-devel nss-devel
 BuildRequires: openldap-devel openssl-devel dbus-devel libnl-devel
 Source0: http://downloads.sourceforge.net/linuxquota/%{name}-%{version}.tar.gz
-Patch0:	quota-3.06-warnquota.patch
+Patch0: quota-3.06-warnquota.patch
 Patch1: quota-3.06-no-stripping.patch
 Patch2: quota-3.06-man-page.patch
 Patch3: quota-3.06-pie.patch
@@ -23,10 +23,12 @@ Patch4: quota-3.13-wrong-ports.patch
 Patch5: quota-3.16-helpoption.patch
 Patch6: quota-3.16-quotaoffhelp.patch
 Patch7: quota-3.17-quotactlmanpage.patch
+# Bug #528581, remove in upstream 4.00
+Patch8: quota-3.17-quotactl_null_corruption.patch
 
 %description
 The quota package contains system administration tools for monitoring
-and limiting user and or group disk usage per filesystem.
+and limiting user and or group disk usage per file system.
 
 %package devel
 Summary: Development files for quota
@@ -35,7 +37,7 @@ Requires: quota =  %{epoch}:%{version}-%
 
 %description devel
 The quota package contains system administration tools for monitoring
-and limiting user and or group disk usage per filesystem.
+and limiting user and or group disk usage per file system.
 
 This package contains development header files for implementing quotas
 on remote machines.
@@ -53,6 +55,7 @@ on remote machines.
 %patch5 -p1
 %patch6 -p1 -b .usage
 %patch7 -p1 -b .quotactlman
+%patch8 -p1 -b .quotactl_null_corruption
 
 #fix typos/mistakes in localized documentation
 for pofile in $(find ./po/*.p*)
@@ -115,6 +118,11 @@ rm -rf %{buildroot}
 %attr(0644,root,root) %{_mandir}/man3/*
 
 %changelog
+* Tue May 10 2010 Petr Pisar <ppisar at redhat.com> 1:3.17-9
+- Prevent corruptive read/write from/to NULL address in rpc.rquotad
+  (Resolves #528581, example in #532342)
+- Fix spelling in summary
+
 * Wed Sep 30 2009 Ondrej Vasik <ovasik at redhat.com> 1:3.17-8
 - add buildrequires for quota_nld, enable-netlink to build
   quota_nld (#526047)



More information about the scm-commits mailing list