lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Mar 2008 14:41:40 -0400
From:	Hideo AOKI <haoki@...hat.com>
To:	netdev <netdev@...r.kernel.org>,
	David Miller <davem@...emloft.net>,
	Herbert Xu <herbert@...dor.apana.org.au>
Subject: [RFC PATCH] [NET] [1/2] revert audit_expand()

This patch reverts commit 406a1d868001423c85a3165288e566e65f424fe6
to apply bug fix of the root cause to kernel.

I leave the fix of pskb_expand_head() call in the commit. Changing
2nd argument from skb_headroom(skb) to 0 is correct, because
audit_expand() should expand only tail room as its definition.

Signed-off-by: Hideo Aoki <haoki@...hat.com>
---

 audit.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff -pruN net-2.6/kernel/audit.c net-2.6-mod-p1/kernel/audit.c
--- net-2.6/kernel/audit.c	2008-03-24 09:58:26.000000000 -0400
+++ net-2.6-mod-p1/kernel/audit.c	2008-03-24 14:22:18.000000000 -0400
@@ -1117,17 +1117,13 @@ struct audit_buffer *audit_log_start(str
 static inline int audit_expand(struct audit_buffer *ab, int extra)
 {
 	struct sk_buff *skb = ab->skb;
-	int oldtail = skb_tailroom(skb);
 	int ret = pskb_expand_head(skb, 0, extra, ab->gfp_mask);
-	int newtail = skb_tailroom(skb);
 
 	if (ret < 0) {
 		audit_log_lost("out of memory in audit_expand");
 		return 0;
 	}
-
-	skb->truesize += newtail - oldtail;
-	return newtail;
+	return skb_tailroom(skb);
 }
 
 /*
-- 
Hitachi Computer Products (America) Inc.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ