commit | 81ace28ca05d2326193cd658604becf09fc0b603 | [log] [tgz] |
---|---|---|
author | Ke Wu <[email protected]> | Fri Apr 16 04:00:10 2021 -0700 |
committer | Arnav Kansal <[email protected]> | Tue Apr 20 19:15:56 2021 +0000 |
tree | 6e09f3dd34aa4c2ed13b31ac5e31f8b0c6072069 | |
parent | c409014c90e96644c5d326df00c05a937ad998a2 [diff] |
netfilter: x_tables: fix compat match/target pad out-of-bound write xt_compat_match/target_from_user doesn't check that zeroing the area to start of next rule won't write past end of allocated ruleset blob. Remove this code and zero the entire blob beforehand. Reported-by: [email protected] Reported-by: Andy Nguyen <[email protected]> Fixes: 9fa492cdc160c ("[NETFILTER]: x_tables: simplify compat API") Signed-off-by: Florian Westphal <[email protected]> BUG=b/184972413 TEST=Presubmit test RELEASE_NOTE=Fixd an issue in kernel that netfilter/x_tables.c may cause out-of-bound write SOURCE=FROMLIST(https://patchwork.ozlabs.org/project/netfilter-devel/patch/[email protected]/) cos-patch: security-high Change-Id: I2752c7c9eb17d48790adb6cebd0a7824b2c9f414 Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/15631 Tested-by: Cusky Presubmit Bot <[email protected]> Main-Branch-Verified: Cusky Presubmit Bot <[email protected]> Reviewed-by: Roy Yang <[email protected]> Reviewed-by: Oleksandr Tymoshenko <[email protected]> (cherry picked from commit b6bcfb87a592c722322cd0907f59b0c019af70e7) Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/15790 Reviewed-by: Robert Kolchmeyer <[email protected]> Tested-by: Robert Kolchmeyer <[email protected]>