diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2018-01-29 15:21:20 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-01-31 16:59:24 +0300 |
commit | 1e98ffea5a8935ec040ab72299e349cb44b8defd (patch) | |
tree | 512f7e462d332f478c0e3459ca1794abc0c32a9d /net/netfilter/xt_IDLETIMER.c | |
parent | 0b8d9073539e217f79ec1bff65eb205ac796723d (diff) | |
download | linux-1e98ffea5a8935ec040ab72299e349cb44b8defd.tar.xz |
netfilter: x_tables: fix pointer leaks to userspace
Several netfilter matches and targets put kernel pointers into
info objects, but don't set usersize in descriptors.
This leads to kernel pointer leaks if a match/target is set
and then read back to userspace.
Properly set usersize for these matches/targets.
Found with manual code inspection.
Fixes: ec2318904965 ("xtables: extend matches and targets with .usersize")
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/xt_IDLETIMER.c')
-rw-r--r-- | net/netfilter/xt_IDLETIMER.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c index ee3421ad108d..6c2482b709b1 100644 --- a/net/netfilter/xt_IDLETIMER.c +++ b/net/netfilter/xt_IDLETIMER.c @@ -252,6 +252,7 @@ static struct xt_target idletimer_tg __read_mostly = { .family = NFPROTO_UNSPEC, .target = idletimer_tg_target, .targetsize = sizeof(struct idletimer_tg_info), + .usersize = offsetof(struct idletimer_tg_info, timer), .checkentry = idletimer_tg_checkentry, .destroy = idletimer_tg_destroy, .me = THIS_MODULE, |