====================
bpf: Fix verifier crash on BPF_NEG with pointer register
This patch fixes a crash in the BPF verifier triggered when the BPF_NEG
operation is applied to a pointer-typed register. The verifier now
checks that the destination register is not a pointer before performing
the operation.
Tested with syzkaller reproducer and new BPF sefltest. Closes: https://syzkaller.appspot.com/bug?extid=d36d5ae81e1b0a53ef58
Changes v4:
Cleaning up, instead of using __is_pointer_value it's further
simplified by checking if regs[insn->dst_reg].type of SCALAR_VALUE
Link: