rpms/quota/F-11 quota-3.17-quotactl_null_corruption.patch, NONE, 1.1 quota.spec, 1.55, 1.56

Petr Pisar ppisar at fedoraproject.org
Mon May 10 16:11:10 UTC 2010


Author: ppisar

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

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-11/quota.spec,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- quota.spec	22 Oct 2009 06:16:25 -0000	1.55
+++ quota.spec	10 May 2010 16:11:09 -0000	1.56
@@ -5,7 +5,7 @@ Name: quota
 Summary: System administration tools for monitoring users' disk usage
 Epoch: 1
 Version: 3.17
-Release: 6%{?dist}
+Release: 7%{?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
 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 .quotawarn
+%patch8 -p1 -b .quotactl_null_corruption
 
 #fix typos/mistakes in localized documentation
 for pofile in $(find ./po/*.p*)
@@ -86,7 +89,7 @@ rm -f %{buildroot}%{_sbindir}/quot
 rm -f %{buildroot}%{_sbindir}/xqmstats
 rm -f %{buildroot}%{_mandir}/man8/quot.*
 rm -f %{buildroot}%{_mandir}/man8/xqmstats.*
-ln -sf  ./quotaon.8 \
+ln -sf ./quotaon.8 \
   %{buildroot}%{_mandir}/man8/quotaoff.8
 ln -s rquotad.8.gz \
    %{buildroot}%{_mandir}/man8/rpc.rquotad.8
@@ -114,6 +117,11 @@ rm -rf %{buildroot}
 %attr(0644,root,root) %{_mandir}/man3/*
 
 %changelog
+* Tue May 10 2010 Petr Pisar <ppisar at redhat.com> 1:3.17-7
+- Prevent corruptive read/write from/to NULL address in rpc.rquotad
+  (Resolves #528581, example in #532342)
+- Fix spelling in summary
+
 * Thu Oct 22 2009 Ondrej Vasik <ovasik at redhat.com> 1:3.17-6
 - added accidently forgotten patch to fix #524138
 



More information about the scm-commits mailing list