mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 02:16:43 +07:00
netfilter: nf_conntrack_h323: restore boundary check correctness
Since commitbc7d811ace
("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:bc7d811ace
("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>
This commit is contained in:
parent
33cc3c0cfa
commit
f5e85ce8e7
@ -172,7 +172,7 @@ static int nf_h323_error_boundary(struct bitstr *bs, size_t bytes, size_t bits)
|
|||||||
if (bits % BITS_PER_BYTE > 0)
|
if (bits % BITS_PER_BYTE > 0)
|
||||||
bytes++;
|
bytes++;
|
||||||
|
|
||||||
if (*bs->cur + bytes > *bs->end)
|
if (bs->cur + bytes > bs->end)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user