Re: [PATCH stable 4.18] bpf, arm32: fix stack var offset in jit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 18, 2018 at 12:21:34AM +0200, Daniel Borkmann wrote:
> Commit 38ca93060163 ("bpf, arm32: save 4 bytes of unneeded stack
> space") messed up STACK_VAR() by 4 bytes presuming it was related
> to skb scratch buffer space, but it clearly isn't as this refers
> to the top word in stack, therefore restore it. This fixes a NULL
> pointer dereference seen during bootup when JIT is enabled and BPF
> program run in sk_filter_trim_cap() triggered by systemd-udevd.
> 
> JIT rework in 1c35ba122d4a ("ARM: net: bpf: use negative numbers
> for stacked registers") and 96cced4e774a ("ARM: net: bpf: access
> eBPF scratch space using ARM FP register") removed the affected
> parts, so only needed in 4.18 stable.
> 
> Fixes: 38ca93060163 ("bpf, arm32: save 4 bytes of unneeded stack space")
> Reported-by: Peter Robinson <pbrobinson@xxxxxxxxx>
> Reported-by: Marc Haber <mh+netdev@xxxxxxxxxxxx>
> Tested-by: Stefan Wahren <stefan.wahren@xxxxxxxx>
> Tested-by: Peter Robinson <pbrobinson@xxxxxxxxx>
> Cc: Russell King <rmk+kernel@xxxxxxxxxxxxxxx>
> Cc: Alexei Starovoitov <ast@xxxxxxxxxx>
> Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>

Acked-by: Alexei Starovoitov <ast@xxxxxxxxxx>




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux