Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754064Ab1DDNY3 (ORCPT ); Mon, 4 Apr 2011 09:24:29 -0400 Received: from stinky.trash.net ([213.144.137.162]:52173 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750934Ab1DDNY0 (ORCPT ); Mon, 4 Apr 2011 09:24:26 -0400 Message-ID: <4D99C683.5070000@trash.net> Date: Mon, 04 Apr 2011 15:24:19 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100620 Icedove/3.0.5 MIME-Version: 1.0 To: David Miller CC: dsterba@suse.cz, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@kernel.org, Netfilter Development Mailinglist Subject: Re: [PATCH] netfilter: h323: bug in parsing of ASN1 SEQOF field References: <1300794929-1541-1-git-send-email-dsterba@suse.cz> <20110322.193349.102533280.davem@davemloft.net> In-Reply-To: <20110322.193349.102533280.davem@davemloft.net> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1746 Lines: 46 On 23.03.2011 03:33, David Miller wrote: > From: David Sterba > Date: Tue, 22 Mar 2011 12:55:29 +0100 > >> Static analyzer of clang found a dead store which appears to be a bug in >> reading count of items in SEQOF field, only the lower byte of word is >> stored. This may lead to corrupted read and communication shutdown. >> >> The bug has been in the module since it's first inclusion into linux >> kernel. >> >> Signed-off-by: David Sterba > > Please send netfilter patches to the listed netfilter maintainer > and appropriate mailing lists. I've added them to the CC: > > Otherwise your patch will not be looked at by the right people. > >> CC: David Miller >> CC: netdev@vger.kernel.org >> CC: stable@kernel.org >> --- >> net/netfilter/nf_conntrack_h323_asn1.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/net/netfilter/nf_conntrack_h323_asn1.c b/net/netfilter/nf_conntrack_h323_asn1.c >> index 8678823..bcd5ed6 100644 >> --- a/net/netfilter/nf_conntrack_h323_asn1.c >> +++ b/net/netfilter/nf_conntrack_h323_asn1.c >> @@ -631,7 +631,7 @@ static int decode_seqof(bitstr_t *bs, const struct field_t *f, >> CHECK_BOUND(bs, 2); >> count = *bs->cur++; >> count <<= 8; >> - count = *bs->cur++; >> + count += *bs->cur++; >> break; This looks correct to me. The problem is without practical consequence though, the largest amount of sequence-of members we parse is 30. Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/