syzbot


general protection fault in dev_map_hash_update_elem
Status: fixed on 2019/10/15 23:39
Reported-by: syzbot+4e7a85b1432052e8d6f8@syzkaller.appspotmail.com
Fix commit: af58e7ee xdp: Fix race in dev_map_hash_update_elem() when replacing element
First crash: 541d, last: 534d

Cause bisection: the cause commit could be any of (bisect log):
  116e7dbe34b4 Merge branch 'gen-syn-cookie'
  91bc35789db4 selftests/bpf: add test for bpf_tcp_gen_syncookie
  637f71c09ba2 selftests/bpf: bpf_tcp_gen_syncookie->bpf_helpers
  bf8ff0f8cfd7 selftests/bpf: fix clearing buffered output between tests/subtests
  3745ee18017e bpf: sync bpf.h to tools/
  a98bf57391a2 tools: bpftool: add support for reporting the effective cgroup progs
  70d66244317e bpf: add bpf_tcp_gen_syncookie helper
  9babe825da76 bpf: always allocate at least 16 bytes for setsockopt hook
  9349d600fb6a tcp: add skb-less helpers to retrieve SYN cookie
  fd5ef31f370a selftests/bpf: extend sockopt_sk selftest with TCP_CONGESTION use case
  02bc2b64940e Merge branch 'setsockopt-extra-mem'
  965112785e4b tcp: tcp_syn_flood_action read port from socket
  a78d0dbec712 selftests/bpf: add loop test 4
  d3406913561c Merge branch 'devmap_hash'
  1375dc4a4579 tools: Add definitions for devmap_hash map type
  8c30396074c1 selftests/bpf: add loop test 5
  946152b3c5d6 selftests/bpf: test_progs: switch to open_memstream
  e42346192c9f tools/libbpf_probes: Add new devmap_hash type
  10fbe21163fc tools/include/uapi: Add devmap_hash BPF map type
  66bd2ec1e0d9 selftests/bpf: test_progs: test__printf -> printf
  16e910d4467c selftests/bpf: test_progs: drop extra trailing tab
  6f9d451ab1a3 xdp: Add devmap_hash map type for looking up devices by hashed index
  682cdbdc2160 Merge branch 'test_progs-stdio'
  fca16e51078e xdp: Refactor devmap allocation code for reuse
  6dbff13ca8a2 include/bpf.h: Remove map_insert_ctx() stubs
  ef20a9b27c66 libbpf: add helpers for working with BTF types
  475e31f8da1b Merge branch 'revamp-test_progs'
  b03bc6853c0e libbpf: convert libbpf code to use new btf helpers
  4cedc0dad9b5 libbpf: add .BTF.ext offset relocation section loading
  b207edfe4e02 selftests/bpf: convert send_signal.c to use subtests
  51436ed78d59 selftests/bpf: convert bpf_verif_scale.c to sub-tests API
  ddc7c3042614 libbpf: implement BPF CO-RE offset relocation algorithm
  2dc26d5a4f2e selftests/bpf: add BPF_CORE_READ relocatable read macro
  3a516a0a3a7b selftests/bpf: add sub-tests support for test_progs
  0ff97e56c098 selftests/bpf: abstract away test log output
  df36e621418b selftests/bpf: add CO-RE relocs testing setup
  002d3afce655 selftests/bpf: add CO-RE relocs struct flavors tests
  329e38f76cc2 selftest/bpf: centralize libbpf logging management for test_progs
  e87fd8bae44c libbpf: return previous print callback from libbpf_set_print
  ec6438a988a4 selftests/bpf: add CO-RE relocs nesting tests
  20a9ad2e7136 selftests/bpf: add CO-RE relocs array tests
  8160bae21fc2 selftests/bpf: add test selectors by number and name to test_progs
  766f2a59323a selftests/bpf: revamp test_progs to allow more control
  d9db3550300f selftests/bpf: add CO-RE relocs enum/ptr/func_proto tests
  61098e89e6c8 selftests/bpf: prevent headers to be compiled as C code
  9654e2ae908e selftests/bpf: add CO-RE relocs modifiers/typedef tests
  943e398dd36c Merge branch 'flow_dissector-input-flags'
  d698f9dbdbed selftests/bpf: add CO-RE relocs ptr-as-array tests
  c1f5e7dd19e7 selftests/bpf: add CO-RE relocs ints tests
  e853ae776a58 selftests/bpf: support BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP
  29e1c6687245 selftests/bpf: add CO-RE relocs misc tests
  71c99e32b926 bpf/flow_dissector: support ipv6 flow_label and BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL
  726e333fd2e9 Merge branch 'compile-once-run-everywhere'
  ae173a915785 selftests/bpf: support BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG
  57debff23c4c tools/bpf: sync bpf_flow_keys flags
  b707659213d3 tools/bpf: fix core_reloc.c compilation error
  b2ca4e1cfa7d bpf/flow_dissector: support flags in BPF_PROG_TEST_RUN
  d9973cec9d57 xdp: xdp_umem: fix umem pages mapping for 32bits systems
  1ac6b126dbe8 bpf/flow_dissector: document flags
  3783d43752ea samples/bpf: xdp_fwd rename devmap name to be xdp_tx_ports
  086f95682114 bpf/flow_dissector: pass input flags to BPF flow dissector program
  a32a32cb26eb samples/bpf: make xdp_fwd more practically usable via devmap lookup
  03cd1d1a493e selftests/bpf: Add selftests for bpf_perf_event_output
  abcce733adb7 samples/bpf: xdp_fwd explain bpf_fib_lookup return codes
  7c4b90d79d0f bpf: Allow bpf_skb_event_output for a few prog types
  9f30cd568b39 Merge branch 'bpf-xdp-fwd-sample-improvements'
  5e31d507da6c Merge branch 'convert-tests-to-libbpf'
  a664a834579a tools: bpftool: fix reading from /proc/config.gz
  341dfcf8d78e btf: expose BTF info through sysfs
  47da6e4dc3d3 selftests/bpf: remove perf buffer helpers
  c17bec549c9d samples/bpf: switch trace_output sample to perf_buffer API
  d66fa3c70e59 tools: bpftool: add feature check for zlib
  9840a4ffcf0b selftests/bpf: fix race in flow dissector tests
  f58a4d51d8da samples/bpf: convert xdp_sample_pkts_user to perf_buffer API
  7fd785685e22 btf: rename /sys/kernel/btf/kernel into /sys/kernel/btf/vmlinux
  898ca681cd78 selftests/bpf: switch test_tcpnotify to perf_buffer API
  58b80815362e selftests/bpf: convert test_get_stack_raw_tp to perf_buffer API
  a1916a153c25 libbpf: attempt to load kernel BTF from sysfs first
  72ef80b5ee13 Merge branch 'bpf-libbpf-read-sysfs-btf'
  f2a3e4e95f40 libbpf: provide more helpful message on uninitialized global var
  708852dcac84 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Patch testing requests:
Created Duration User Patch Repo Result
2019/09/07 14:38 16m toke@redhat.com patch net-next OK
2019/09/07 10:54 10m toke@redhat.com patch net-next report log
2019/09/07 10:53 16m toke@redhat.com patch net-next OK
2019/09/06 23:08 3m toke@redhat.com patch linux-next error
2019/09/06 23:07 4m toke@redhat.com patch linux-next error
2019/09/06 23:06 3m toke@redhat.com patch linux-next error

Sample crash report:

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-net-kasan-gce 2019/09/12 09:11 net-next c1609946 f4e53c10 .config log report syz C
ci-upstream-bpf-next-kasan-gce 2019/09/08 01:58 bpf-next a2c11b03 a60cb4cd .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2019/09/12 06:45 linux-next 6d028043 f4e53c10 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2019/09/05 13:48 linux-next 6d028043 040fda58 .config log report syz