[patch 43/49] netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Monday, August 18, 2008 - 12:20 pm

2.6.25-stable review patch.  If anyone has any objections, please let us know.

------------------

From: David Howells <dhowells@redhat.com>

commit 252815b0cfe711001eff0327872209986b36d490 upstream

Fix a range check in netfilter IP NAT for SNMP to always use a big enough size
variable that the compiler won't moan about comparing it to ULONG_MAX/8 on a
64-bit platform.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Eugene Teo <eteo@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/ipv4/netfilter/nf_nat_snmp_basic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c
+++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c
@@ -438,8 +438,8 @@ static unsigned char asn1_oid_decode(str
 				     unsigned int *len)
 {
 	unsigned long subid;
-	unsigned int  size;
 	unsigned long *optr;
+	size_t size;
 
 	size = eoc - ctx->pointer + 1;
 

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/49] 2.6.25-stable review, Greg KH, (Mon Aug 18, 12:18 pm)
[patch 07/49] SCSI: ses: fix VPD inquiry overrun, Greg KH, (Mon Aug 18, 12:19 pm)
[patch 12/49] radeonfb: fix accel engine hangs, Greg KH, (Mon Aug 18, 12:19 pm)
[patch 15/49] mlock() fix return values, Greg KH, (Mon Aug 18, 12:19 pm)
[patch 23/49] random32: seeding improvement, Greg KH, (Mon Aug 18, 12:20 pm)
[patch 25/49] sparc64: FUTEX_OP_ANDN fix, Greg KH, (Mon Aug 18, 12:20 pm)
[patch 27/49] uml: fix build when SLOB is enabled, Greg KH, (Mon Aug 18, 12:20 pm)
[patch 30/49] uml: track and make up lost ticks, Greg KH, (Mon Aug 18, 12:20 pm)
[patch 39/49] uml: Fix boot crash, Greg KH, (Mon Aug 18, 12:20 pm)
[patch 40/49] uml: PATH_MAX needs limits.h, Greg KH, (Mon Aug 18, 12:20 pm)
[patch 41/49] radeon: misc corrections, Greg KH, (Mon Aug 18, 12:20 pm)
[patch 43/49] netfilter: nf_nat_snmp_basic: fix a range ch ..., Greg KH, (Mon Aug 18, 12:20 pm)
[patch 46/49] x86: fix spin_is_contended(), Greg KH, (Mon Aug 18, 12:21 pm)