]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conntrack_h323: restore boundary check correctness
authorJakub Jankowski <shasta@toxcorp.com>
Thu, 25 Apr 2019 21:46:50 +0000 (23:46 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 5 May 2019 22:36:17 +0000 (00:36 +0200)
commit5ec500e24cccc72cad470796e71bd24e7a75a71a
tree53938cb6e125dbb15a2cda02814a44e816b2cfd8
parenta45ca35f859e908a34e75e689695cb002377f4c5
netfilter: nf_conntrack_h323: restore boundary check correctness

Since commit f5b8ecb074e7 ("netfilter: nf_ct_h323: Convert
CHECK_BOUND macro to function"), NAT traversal for H.323
doesn't work, failing to parse H323-UserInformation.
nf_h323_error_boundary() compares contents of the bitstring,
not the addresses, preventing valid H.323 packets from being
conntrack'd.

This looks like an oversight from when CHECK_BOUND macro was
converted to a function.

To fix it, stop dereferencing bs->cur and bs->end.

Fixes: f5b8ecb074e7 ("netfilter: nf_ct_h323: Convert CHECK_BOUND macro to function")
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_h323_asn1.c