netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] netfilter: h323: bug in parsing of ASN1 SEQOF field
       [not found] ` <20110322.193349.102533280.davem@davemloft.net>
@ 2011-04-04 13:24   ` Patrick McHardy
  0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2011-04-04 13:24 UTC (permalink / raw)
  To: David Miller
  Cc: dsterba, netdev, linux-kernel, stable,
	Netfilter Development Mailinglist

On 23.03.2011 03:33, David Miller wrote:
> From: David Sterba <dsterba@suse.cz>
> 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 <dsterba@suse.cz>
> 
> 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 <davem@davemloft.net>
>> 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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-04 13:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1300794929-1541-1-git-send-email-dsterba@suse.cz>
     [not found] ` <20110322.193349.102533280.davem@davemloft.net>
2011-04-04 13:24   ` [PATCH] netfilter: h323: bug in parsing of ASN1 SEQOF field Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).