aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorJann Horn <[email protected]>2019-02-06 21:56:15 +0000
committerPablo Neira Ayuso <[email protected]>2019-02-11 16:43:17 +0000
commitc4c07b4d6fa1f11880eab8e076d3d060ef3f55fc (patch)
treeba8683c758581ed3dffa2cb5bf58426377cbb179 /net/tipc
parentMerge branch 'r8169-revert-two-commits-due-to-a-regression' (diff)
downloadkernel-c4c07b4d6fa1f11880eab8e076d3d060ef3f55fc.tar.gz
kernel-c4c07b4d6fa1f11880eab8e076d3d060ef3f55fc.zip
netfilter: nf_nat_snmp_basic: add missing length checks in ASN.1 cbs
The generic ASN.1 decoder infrastructure doesn't guarantee that callbacks will get as much data as they expect; callbacks have to check the `datalen` parameter before looking at `data`. Make sure that snmp_version() and snmp_helper() don't read/write beyond the end of the packet data. (Also move the assignment to `pdata` down below the check to make it clear that it isn't necessarily a pointer we can use before the `datalen` check.) Fixes: cc2d58634e0f ("netfilter: nf_nat_snmp_basic: use asn1 decoder library") Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
Diffstat (limited to 'net/tipc')
0 files changed, 0 insertions, 0 deletions