Skip to content

Commit b4232a2

Browse files
kdavekaber
authored andcommitted
netfilter: h323: bug in parsing of ASN1 SEQOF field
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. [Patrick: the bug is real, but without practical consequence since the largest amount of sequence-of members we parse is 30.] Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Patrick McHardy <kaber@trash.net>
1 parent 2f9f28b commit b4232a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/netfilter/nf_conntrack_h323_asn1.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ static int decode_seqof(bitstr_t *bs, const struct field_t *f,
631631
CHECK_BOUND(bs, 2);
632632
count = *bs->cur++;
633633
count <<= 8;
634-
count = *bs->cur++;
634+
count += *bs->cur++;
635635
break;
636636
case SEMI:
637637
BYTE_ALIGN(bs);

0 commit comments

Comments
 (0)