diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-05-14 15:14:23 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-03 09:18:09 +0300 |
commit | b15b35c649a9085eb8ea8df41d1be87378583e41 (patch) | |
tree | db5ea66e82965fe114592309fd1117e48ff695ef /include | |
parent | 6d968103019c4e17c75c71b98175dc62585cdb1e (diff) | |
download | linux-b15b35c649a9085eb8ea8df41d1be87378583e41.tar.xz |
netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code
commit 4c559f15efcc43b996f4da528cd7f9483aaca36d upstream.
Dan Carpenter says: "Smatch complains that the value for "cmd" comes
from the network and can't be trusted."
Add pptp_msg_name() helper function that checks for the array boundary.
Fixes: f09943fefe6b ("[NETFILTER]: nf_conntrack/nf_nat: add PPTP helper port")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter/nf_conntrack_pptp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/netfilter/nf_conntrack_pptp.h b/include/linux/netfilter/nf_conntrack_pptp.h index 833a5b2255ea..03eb3f49b4af 100644 --- a/include/linux/netfilter/nf_conntrack_pptp.h +++ b/include/linux/netfilter/nf_conntrack_pptp.h @@ -5,7 +5,7 @@ #include <linux/netfilter/nf_conntrack_common.h> -extern const char *const pptp_msg_name[]; +extern const char *const pptp_msg_name(u_int16_t msg); /* state of the control session */ enum pptp_ctrlsess_state { |