diff options
| author | Fang Xieyan <fangxy@xiaopeng.com> | 2026-10-26 17:07:17 +0800 |
|---|---|---|
| committer | Dave Miller <davem@davem-thinkpadp1gen8.ibmlond.csb> | 2026-10-28 11:40:22 +0000 |
| commit | 94cea342e8915812b45f93c56e134041c7fdb4d7 (patch) | |
| tree | f4c66feb1448cb7742050bffdbed9c4e69850b89 /scripts/basic | |
| parent | 083aaafd453c3fb14411519d6ada9a8917573fdb (diff) | |
net: sched: em_ipt: validate hook value from netlink
em_ipt_change() accepts the user-provided TCA_EM_IPT_HOOK value
without validating its range.
The value is later used in check_match() as "1 << im->hook". A hook
value of 32 or greater causes undefined behavior and may undermine the
xt match hook-mask validation. The value is also passed to
nf_hook_state_init() as a hook index.
Reject hook values outside the supported IPv4/IPv6 Netfilter hook
range after checking the required attributes, before loading the xt
match or allocating the match state.
Reviewed-by: Weibin Liu <liuwb@xiaopeng.com>
Signed-off-by: Fang Xieyan <fangxy@xiaopeng.com>
Signed-off-by: Dave Miller <davem@davem-thinkpadp1gen8.ibmlond.csb>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
