Skip to content

Commit

Permalink
s390/bpf,jit: initialize A register if 1st insn is BPF_S_LDX_B_MSH
Browse files Browse the repository at this point in the history
The A register needs to be initialized to zero in the prolog if the
first instruction of the BPF program is BPF_S_LDX_B_MSH to prevent
leaking the content of %r5 to user space.

Cc: <stable@vger.kernel.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Apr 25, 2014
1 parent 06cd7a8 commit 6e0de81
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/s390/net/bpf_jit_comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ static void bpf_jit_noleaks(struct bpf_jit *jit, struct sock_filter *filter)
case BPF_S_LD_W_IND:
case BPF_S_LD_H_IND:
case BPF_S_LD_B_IND:
case BPF_S_LDX_B_MSH:
case BPF_S_LD_IMM:
case BPF_S_LD_MEM:
case BPF_S_MISC_TXA:
Expand Down

0 comments on commit 6e0de81

Please sign in to comment.