aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorGravatar Kees Cook <keescook@chromium.org> 2022-09-27 08:37:01 -0700
committerGravatar Jakub Kicinski <kuba@kernel.org> 2022-09-29 18:44:07 -0700
commit7cba18332e3635aaae60e4e7d4e52849de50d91b (patch)
tree8b18c900a236a5a65f6c612d0728687c5ef4abcd /init
parentdt-bindings: net: snps,dwmac: Document stmmac-axi-config subnode (diff)
downloadlinux-7cba18332e3635aaae60e4e7d4e52849de50d91b.tar.gz
linux-7cba18332e3635aaae60e4e7d4e52849de50d91b.tar.bz2
linux-7cba18332e3635aaae60e4e7d4e52849de50d91b.zip
net: sched: cls_u32: Avoid memcpy() false-positive warning
To work around a misbehavior of the compiler's ability to see into composite flexible array structs (as detailed in the coming memcpy() hardening series[1]), use unsafe_memcpy(), as the sizing, bounds-checking, and allocation are all very tightly coupled here. This silences the false-positive reported by syzbot: memcpy: detected field-spanning write (size 80) of single field "&n->sel" at net/sched/cls_u32.c:1043 (size 16) [1] https://lore.kernel.org/linux-hardening/20220901065914.1417829-2-keescook@chromium.org Cc: Cong Wang <xiyou.wangcong@gmail.com> Cc: Jiri Pirko <jiri@resnulli.us> Reported-by: syzbot+a2c4601efc75848ba321@syzkaller.appspotmail.com Link: https://lore.kernel.org/lkml/000000000000a96c0b05e97f0444@google.com/ Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://lore.kernel.org/r/20220927153700.3071688-1-keescook@chromium.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions