ci starts bisection 2024-03-13 18:47:03.074183493 +0000 UTC m=+104.626671521 bisecting cause commit starting from 9187210eee7d87eea37b45ea93454a88681894a4 building syzkaller on db5b7ff0c1508e1f6bc77ba4df578cabb88b9914 ensuring issue is reproducible on original commit 9187210eee7d87eea37b45ea93454a88681894a4 testing commit 9187210eee7d87eea37b45ea93454a88681894a4 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: ed9abfb8225a1ab93bb93677bd1eb810440643156f1550d2699758e5a49cd32a all runs: crashed: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime representative crash: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime, types: [UBSAN] check whether we can drop unnecessary instrumentation disabling configs for [HANG LEAK BUG KASAN LOCKDEP ATOMIC_SLEEP], they are not needed testing commit 9187210eee7d87eea37b45ea93454a88681894a4 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: a433c5346cec5b89bad1d7346259419317afbb2d13dbcd493b9ea8a90ff7b81e all runs: crashed: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime representative crash: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime, types: [UBSAN] the bug reproduces without the instrumentation disabling configs for [BUG KASAN LOCKDEP ATOMIC_SLEEP HANG LEAK], they are not needed kconfig minimization: base=3940 full=7972 leaves diff=2019 split chunks (needed=false): <2019> split chunk #0 of len 2019 into 5 parts testing without sub-chunk 1/5 disabling configs for [KASAN LOCKDEP ATOMIC_SLEEP HANG LEAK BUG], they are not needed testing commit 9187210eee7d87eea37b45ea93454a88681894a4 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 108c28bdc6dfebf415da9c032a7089e42c041f7a13c828260203c15cb0c9c6cd all runs: crashed: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime representative crash: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime, types: [UBSAN] the chunk can be dropped testing without sub-chunk 2/5 disabling configs for [BUG KASAN LOCKDEP ATOMIC_SLEEP HANG LEAK], they are not needed testing commit 9187210eee7d87eea37b45ea93454a88681894a4 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: f6a28a6131f61a52ddc60beb7b375b816d953cbe6a6c783132f915842a1c6b55 all runs: crashed: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime representative crash: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime, types: [UBSAN] the chunk can be dropped testing without sub-chunk 3/5 disabling configs for [BUG KASAN LOCKDEP ATOMIC_SLEEP HANG LEAK], they are not needed testing commit 9187210eee7d87eea37b45ea93454a88681894a4 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 62642a7baeecad9dc6ca8144efb8267ddccae3a2af8162c007bb81f3dd96b1d5 all runs: crashed: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime representative crash: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime, types: [UBSAN] the chunk can be dropped testing without sub-chunk 4/5 disabling configs for [HANG LEAK BUG KASAN LOCKDEP ATOMIC_SLEEP], they are not needed testing commit 9187210eee7d87eea37b45ea93454a88681894a4 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: f7cdb866a5fcd8543f5a3beef89fffaf619ef2b7c72e443dfe00d097a9549a01 all runs: crashed: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime representative crash: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime, types: [UBSAN] the chunk can be dropped testing without sub-chunk 5/5 disabling configs for [LEAK BUG KASAN LOCKDEP ATOMIC_SLEEP HANG], they are not needed testing commit 9187210eee7d87eea37b45ea93454a88681894a4 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 6c33415fa432dc67b930c59b71c3815ffa9bfaa4f74eb13708c596758e1f71df all runs: OK false negative chance: 0.000 minimized to 403 configs; suspects: [ARCH_ENABLE_MEMORY_HOTREMOVE ATM BCMA BLK_DEV_ZONED BPF_SYSCALL CARDBUS CFG80211 CFG80211_WEXT CMA COMMON_CLK CONTIG_ALLOC CRYPTO_842 CRYPTO_LZ4 CRYPTO_LZ4HC CRYPTO_LZO CRYPTO_ZSTD DVB_CORE EXTCON FB GPIOLIB HID_ZEROPLUS I2C_MUX IIO IOMMUFD IRQ_REMAP KVM KVM_INTEL LIBNVDIMM MEDIA_ANALOG_TV_SUPPORT MEDIA_CAMERA_SUPPORT MEDIA_CEC_SUPPORT MEDIA_CONTROLLER MEDIA_DIGITAL_TV_SUPPORT MEDIA_RADIO_SUPPORT MEDIA_SDR_SUPPORT MEDIA_SUPPORT MEDIA_TEST_SUPPORT MEDIA_USB_SUPPORT MEMORY_HOTPLUG MEMORY_HOTREMOVE MFD_VIPERBOARD PARPORT PCCARD PCMCIA PHONET RADIO_ADAPTERS RADIO_SI470X RADIO_SI4713 RC_CORE RFKILL SND SOUND SPI SSB TAP TARGET_CORE TUN USB_AMD5536UDC USB_ATM USB_CONFIGFS USB_CONFIGFS_ECM USB_CONFIGFS_ECM_SUBSET USB_CONFIGFS_EEM USB_CONFIGFS_F_FS USB_CONFIGFS_F_HID USB_CONFIGFS_F_LB_SS USB_CONFIGFS_F_MIDI USB_CONFIGFS_F_PRINTER USB_CONFIGFS_F_TCM USB_CONFIGFS_F_UAC1 USB_CONFIGFS_F_UAC1_LEGACY USB_CONFIGFS_F_UAC2 USB_CONFIGFS_F_UVC USB_CONFIGFS_MASS_STORAGE USB_CONFIGFS_NCM USB_CONFIGFS_OBEX USB_CONFIGFS_PHONET USB_CONFIGFS_RNDIS USB_CONFIGFS_SERIAL USB_CXACRU USB_CYPRESS_CY7C63 USB_CYTHERM USB_DSBR USB_DUMMY_HCD USB_DWC2 USB_DWC2_HOST USB_DWC2_PCI USB_DWC3 USB_DWC3_GADGET USB_DWC3_OF_SIMPLE USB_DWC3_PCI USB_DWC3_ULPI USB_DYNAMIC_MINORS USB_EG20T USB_EHCI_HCD_PLATFORM USB_EHCI_ROOT_HUB_TT USB_EHSET_TEST_FIXTURE USB_EMI26 USB_EMI62 USB_EPSON2888 USB_EZUSB_FX2 USB_FEW_INIT_RETRIES USB_F_ACM USB_F_ECM USB_F_EEM USB_F_FS USB_F_HID USB_F_MASS_STORAGE USB_F_MIDI USB_F_NCM USB_F_OBEX USB_F_PHONET USB_F_PRINTER USB_F_RNDIS USB_F_SERIAL USB_F_SS_LB USB_F_SUBSET USB_F_TCM USB_F_UAC1 USB_F_UAC1_LEGACY USB_F_UAC2 USB_F_UVC USB_GADGET USB_GADGETFS USB_GADGET_DEBUG_FILES USB_GADGET_DEBUG_FS USB_GL860 USB_GOKU USB_GPIO_VBUS USB_GR_UDC USB_GSPCA USB_GSPCA_BENQ USB_GSPCA_CONEX USB_GSPCA_CPIA1 USB_GSPCA_DTCS033 USB_GSPCA_ETOMS USB_GSPCA_FINEPIX USB_GSPCA_JEILINJ USB_GSPCA_JL2005BCD USB_GSPCA_KINECT USB_GSPCA_KONICA USB_GSPCA_MARS USB_GSPCA_MR97310A USB_GSPCA_NW80X USB_GSPCA_OV519 USB_GSPCA_OV534 USB_GSPCA_OV534_9 USB_GSPCA_PAC207 USB_GSPCA_PAC7302 USB_GSPCA_PAC7311 USB_GSPCA_SE401 USB_GSPCA_SN9C2028 USB_GSPCA_SN9C20X USB_GSPCA_SONIXB USB_GSPCA_SONIXJ USB_GSPCA_SPCA1528 USB_GSPCA_SPCA500 USB_GSPCA_SPCA501 USB_GSPCA_SPCA505 USB_GSPCA_SPCA506 USB_GSPCA_SPCA508 USB_GSPCA_SPCA561 USB_GSPCA_SQ905 USB_GSPCA_SQ905C USB_GSPCA_SQ930X USB_GSPCA_STK014 USB_GSPCA_STK1135 USB_GSPCA_STV0680 USB_GSPCA_SUNPLUS USB_GSPCA_T613 USB_GSPCA_TOPRO USB_GSPCA_TOUPTEK USB_GSPCA_TV8532 USB_GSPCA_VC032X USB_GSPCA_VICAM USB_GSPCA_XIRLINK_CIT USB_GSPCA_ZC3XX USB_HACKRF USB_HCD_BCMA USB_HCD_SSB USB_HSIC_USB3503 USB_HSIC_USB4604 USB_HSO USB_HUB_USB251XB USB_IDMOUSE USB_IOWARRIOR USB_IPHETH USB_ISIGHTFW USB_ISP116X_HCD USB_ISP1301 USB_ISP1760 USB_ISP1760_DUAL_ROLE USB_ISP1760_HCD USB_ISP1761_UDC USB_KAWETH USB_KC2190 USB_KEENE USB_LAN78XX USB_LCD USB_LD USB_LEDS_TRIGGER_USBPORT USB_LED_TRIG USB_LEGOTOWER USB_LIBCOMPOSITE USB_LINK_LAYER_TEST USB_M5602 USB_MA901 USB_MAX3421_HCD USB_MDC800 USB_MICROTEK USB_MR800 USB_MSI2500 USB_MUSB_DUAL_ROLE USB_MUSB_HDRC USB_MV_U3D USB_MV_UDC USB_NET2272 USB_NET2272_DMA USB_NET2280 USB_NET_AX88179_178A USB_NET_AX8817X USB_NET_CDCETHER USB_NET_CDC_EEM USB_NET_CDC_MBIM USB_NET_CDC_NCM USB_NET_CDC_SUBSET USB_NET_CDC_SUBSET_ENABLE USB_NET_CH9200 USB_NET_CX82310_ETH USB_NET_DM9601 USB_NET_GL620A USB_NET_HUAWEI_CDC_NCM USB_NET_INT51X1 USB_NET_KALMIA USB_NET_MCS7830 USB_NET_NET1080 USB_NET_PLUSB USB_NET_QMI_WWAN USB_NET_RNDIS_HOST USB_NET_SMSC75XX USB_NET_SMSC95XX USB_NET_SR9700 USB_NET_SR9800 USB_NET_ZAURUS USB_OHCI_HCD_PLATFORM USB_OTG USB_OTG_FSM USB_OXU210HP_HCD USB_PEGASUS USB_PULSE8_CEC USB_PWC USB_PWC_INPUT_EVDEV USB_PXA27X USB_R8A66597 USB_R8A66597_HCD USB_RAINSHADOW_CEC USB_RAREMONO USB_RAW_GADGET USB_RTL8150 USB_RTL8152 USB_RTL8153_ECM USB_S2255 USB_SERIAL USB_SERIAL_AIRCABLE USB_SERIAL_ARK3116 USB_SERIAL_BELKIN USB_SERIAL_CH341 USB_SERIAL_CONSOLE USB_SERIAL_CP210X USB_SERIAL_CYBERJACK USB_SERIAL_CYPRESS_M8 USB_SERIAL_DEBUG USB_SERIAL_DIGI_ACCELEPORT USB_SERIAL_EDGEPORT USB_SERIAL_EDGEPORT_TI USB_SERIAL_EMPEG USB_SERIAL_F81232 USB_SERIAL_F8153X USB_SERIAL_FTDI_SIO USB_SERIAL_GARMIN USB_SERIAL_GENERIC USB_SERIAL_IPAQ USB_SERIAL_IPW USB_SERIAL_IR USB_SERIAL_IUU USB_SERIAL_KEYSPAN USB_SERIAL_KEYSPAN_PDA USB_SERIAL_KLSI USB_SERIAL_KOBIL_SCT USB_SERIAL_MCT_U232 USB_SERIAL_METRO USB_SERIAL_MOS7715_PARPORT USB_SERIAL_MOS7720 USB_SERIAL_MOS7840 USB_SERIAL_MXUPORT USB_SERIAL_NAVMAN USB_SERIAL_OMNINET USB_SERIAL_OPTICON USB_SERIAL_OPTION USB_SERIAL_OTI6858 USB_SERIAL_PL2303 USB_SERIAL_QCAUX USB_SERIAL_QT2 USB_SERIAL_QUALCOMM USB_SERIAL_SAFE USB_SERIAL_SIERRAWIRELESS USB_SERIAL_SIMPLE USB_SERIAL_SPCP8X5 USB_SERIAL_SSU100 USB_SERIAL_SYMBOL USB_SERIAL_TI USB_SERIAL_UPD78F0730 USB_SERIAL_VISOR USB_SERIAL_WHITEHEAT USB_SERIAL_WISHBONE USB_SERIAL_WWAN USB_SERIAL_XR USB_SERIAL_XSENS_MT USB_SEVSEG USB_SI470X USB_SI4713 USB_SIERRA_NET USB_SISUSBVGA USB_SL811_CS USB_SL811_HCD USB_SL811_HCD_ISO USB_SNP_CORE USB_SPEEDTOUCH USB_STORAGE_ALAUDA USB_STORAGE_CYPRESS_ATACB USB_STORAGE_DATAFAB USB_STORAGE_ENE_UB6250 USB_STORAGE_FREECOM USB_STORAGE_ISD200 USB_STORAGE_JUMPSHOT USB_STORAGE_KARMA USB_STORAGE_ONETOUCH USB_STORAGE_SDDR09 USB_STORAGE_SDDR55 USB_STORAGE_USBAT USB_STV06XX USB_TEST USB_TMC USB_TRANCEVIBRATOR USB_UAS USB_UEAGLEATM USB_ULPI_BUS USB_USBNET USB_USS720 USB_U_AUDIO USB_U_ETHER USB_U_SERIAL USB_VIDEO_CLASS USB_VIDEO_CLASS_INPUT_EVDEV USB_VL600 USB_WDM USB_XHCI_DBGCAP USB_XHCI_PLATFORM USB_XUSBATM USB_YUREX USERFAULTFD USERIO USERMODE_DRIVER USER_RETURN_NOTIFIER UVC_COMMON U_SERIAL_CONSOLE V4L2_MEM2MEM_DEV V4L_TEST_DRIVERS VALIDATE_FS_PARSER VDPA VDPA_SIM VDPA_SIM_BLOCK VDPA_SIM_NET VDPA_USER VETH VFIO VFIO_DEVICE_CDEV VFIO_PCI VFIO_PCI_CORE VFIO_PCI_INTX VFIO_PCI_MMAP VFIO_VIRQFD VGASTATE VHOST VHOST_CROSS_ENDIAN_LEGACY VHOST_IOTLB VHOST_NET VHOST_RING VHOST_TASK VHOST_VDPA VHOST_VSOCK VIDEOBUF2_CORE VIDEOBUF2_DMA_CONTIG VIDEOBUF2_DMA_SG VIDEOBUF2_MEMOPS VIDEOBUF2_V4L2 VIDEOBUF2_VMALLOC VIDEOMODE_HELPERS VIDEO_AU0828 VIDEO_AU0828_RC VIDEO_AU0828_V4L2 VIDEO_CMDLINE VIDEO_CS53L32A VIDEO_CX231XX VIDEO_CX231XX_ALSA VIDEO_CX231XX_DVB VIDEO_CX231XX_RC VIDEO_CX2341X VIDEO_CX25840 VIDEO_DEV VIDEO_EM28XX VIDEO_EM28XX_ALSA VIDEO_EM28XX_DVB VIDEO_EM28XX_RC VIDEO_EM28XX_V4L2 VIDEO_GO7007 VIDEO_GO7007_LOADER VIDEO_GO7007_USB VIDEO_GO7007_USB_S2250_BOARD VIDEO_HDPVR VIDEO_MSP3400 VIDEO_NOMODESET VIDEO_PVRUSB2 VIDEO_PVRUSB2_DVB VIDEO_PVRUSB2_SYSFS VIDEO_SAA711X VIDEO_STK1160 VIDEO_TUNER VIDEO_TVEEPROM VIDEO_USBTV VIDEO_V4L2_I2C VIDEO_V4L2_SUBDEV_API VIDEO_V4L2_TPG VIDEO_VICODEC VIDEO_VIM2M VIDEO_VIMC VIDEO_VIVID VIDEO_VIVID_CEC VIDEO_WM8775 VIPERBOARD_ADC VIRTIO_BALLOON VIRTIO_DMA_SHARED_BUFFER VIRTIO_MEM VIRTIO_MMIO VIRTIO_MMIO_CMDLINE_DEVICES VIRTIO_PMEM VIRTIO_VDPA VIRTIO_VSOCKETS VIRTIO_VSOCKETS_COMMON VIRT_WIFI VLAN_8021Q VLAN_8021Q_GVRP VLAN_8021Q_MVRP VMAP_PFN VMWARE_VMCI VMXNET3 VP_VDPA VSOCKETS VSOCKETS_DIAG VSOCKETS_LOOPBACK VSOCKMON VT_HW_CONSOLE_BINDING VXFS_FS WANT_DEV_COREDUMP WEXT_CORE WEXT_PRIV WEXT_PROC WIREGUARD WIRELESS WIRELESS_EXT WLAN WLAN_VENDOR_ADMTEK WLAN_VENDOR_PURELIFI WLAN_VENDOR_SILABS X86_SGX X86_SGX_KVM X86_USER_SHADOW_STACK X86_X2APIC X86_X32_ABI XDP_SOCKETS XDP_SOCKETS_DIAG XFRM_ESPINTCP XFRM_INTERFACE XFRM_IPCOMP XFRM_MIGRATE XFRM_OFFLOAD XFRM_STATISTICS XFRM_SUB_POLICY XFRM_USER_COMPAT XFS_FS XFS_POSIX_ACL XFS_QUOTA XFS_RT XOR_BLOCKS YENTA YENTA_ENE_TUNE YENTA_O2 YENTA_RICOH YENTA_TI YENTA_TOSHIBA ZEROPLUS_FF ZLIB_DEFLATE ZONEFS_FS ZPOOL ZRAM ZRAM_DEF_COMP_LZORLE ZSMALLOC ZSTD_COMPRESS ZSWAP ZSWAP_COMPRESSOR_DEFAULT_LZO ZSWAP_DEFAULT_ON ZSWAP_SHRINKER_DEFAULT_ON ZSWAP_ZPOOL_DEFAULT_ZSMALLOC] disabling configs for [BUG KASAN LOCKDEP ATOMIC_SLEEP HANG LEAK], they are not needed picked [v6.8 v6.7 v6.6 v6.4 v6.2 v6.0 v5.18 v5.16 v5.13 v5.10 v5.7 v5.4 v5.1 v4.19] out of 31 release tags testing release v6.8 testing commit e8f897f4afef0031fe618a8e94127a0934896aba gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 87052c7b37e07e6b790d5eee60f62122ea7cfae4fb5049837137130a6c15ad16 all runs: OK false negative chance: 0.000 # git bisect start 9187210eee7d87eea37b45ea93454a88681894a4 e8f897f4afef0031fe618a8e94127a0934896aba Bisecting: 2600 revisions left to test after this (roughly 11 steps) [a01c9fe32378636ae65bec8047b5de3fdb2ba5c8] Merge tag 'nfsd-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux testing commit a01c9fe32378636ae65bec8047b5de3fdb2ba5c8 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: fcd13dc010885a485326542010d193a70604ce7a02fdfd5399c7d6a7ddbe14ca all runs: OK false negative chance: 0.000 # git bisect good a01c9fe32378636ae65bec8047b5de3fdb2ba5c8 Bisecting: 1299 revisions left to test after this (roughly 10 steps) [ca61ba3885274a684c83d8a538eb77b30e38ee92] Merge branch 'rework-genet-mdioclocking' testing commit ca61ba3885274a684c83d8a538eb77b30e38ee92 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 064e008e7b37de5ada6fbddd1e36c3853341cb7c06351e8b564a898ba9987834 all runs: OK false negative chance: 0.000 # git bisect good ca61ba3885274a684c83d8a538eb77b30e38ee92 Bisecting: 649 revisions left to test after this (roughly 9 steps) [45340097ce6ea7e875674a5a7d24c95ecbc93ef9] Bluetooth: hci_conn: Only do ACL connections sequentially testing commit 45340097ce6ea7e875674a5a7d24c95ecbc93ef9 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: a0a75bbc0775ab2cbb10108e881fa2309b0edf60b4edded97b2649d834e8d9d7 all runs: OK false negative chance: 0.000 # git bisect good 45340097ce6ea7e875674a5a7d24c95ecbc93ef9 Bisecting: 312 revisions left to test after this (roughly 8 steps) [2f901582f032bed47907a20f77fb44b3532b4762] Merge tag 'for-net-next-2024-03-08' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next testing commit 2f901582f032bed47907a20f77fb44b3532b4762 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 456000eaf279782e53e575a82020ec1648d72edaa3687b4bbe1b6fdf9229eac1 all runs: OK false negative chance: 0.000 # git bisect good 2f901582f032bed47907a20f77fb44b3532b4762 Bisecting: 156 revisions left to test after this (roughly 7 steps) [5f20e6ab1f65aaaaae248e6946d5cb6d039e7de8] Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next testing commit 5f20e6ab1f65aaaaae248e6946d5cb6d039e7de8 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 10c2cdfb9b86fb031ab16ab6dcdccf6b0e55397a4398eac9524fd52700dbd5e3 all runs: crashed: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime representative crash: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime, types: [UBSAN] # git bisect bad 5f20e6ab1f65aaaaae248e6946d5cb6d039e7de8 Bisecting: 77 revisions left to test after this (roughly 6 steps) [fcac05daa7efcf96f8042bd06abd4da384ac3cd3] net: ipv6: exthdrs: get rid of ipv6_skb_net() testing commit fcac05daa7efcf96f8042bd06abd4da384ac3cd3 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 977baabf5926456ac9632ee2aa4486d40f100f5b61798e702fc83974689ff4e2 all runs: OK false negative chance: 0.000 # git bisect good fcac05daa7efcf96f8042bd06abd4da384ac3cd3 Bisecting: 38 revisions left to test after this (roughly 5 steps) [1576b07961971d4eeb0e269c7133e9a6d430daf8] bpftool: rename is_internal_mmapable_map into is_mmapable_map testing commit 1576b07961971d4eeb0e269c7133e9a6d430daf8 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 502c44a9f82537c49528fa1b795b075a9d713659a4cd2d849ae5b179d9abf538 all runs: crashed: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime representative crash: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime, types: [UBSAN] # git bisect bad 1576b07961971d4eeb0e269c7133e9a6d430daf8 Bisecting: 19 revisions left to test after this (roughly 4 steps) [d9ab2f76ef5abb76190ffb42d83bdc6caede807e] libbpf: Tie struct_ops programs to kernel BTF ids, not to local ids testing commit d9ab2f76ef5abb76190ffb42d83bdc6caede807e gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 76efd101b4f89592ec75aa0a2d22d652ac139e22d646d9ae2837df28c0e5b161 all runs: crashed: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime representative crash: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime, types: [UBSAN] # git bisect bad d9ab2f76ef5abb76190ffb42d83bdc6caede807e Bisecting: 9 revisions left to test after this (roughly 3 steps) [8f50d5c423551bfa259af792647a2f4799780ac5] Merge branch 'Allow struct_ops maps with a large number of programs' testing commit 8f50d5c423551bfa259af792647a2f4799780ac5 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: b113f5a3abaadf26d9451625c6f492a8794ba4cb13466f00cc7ff5939067513c all runs: OK false negative chance: 0.000 # git bisect good 8f50d5c423551bfa259af792647a2f4799780ac5 Bisecting: 4 revisions left to test after this (roughly 2 steps) [4f81c16f50baf6d5d8bfa6eef3250dcfa22cbc08] bpf: Recognize that two registers are safe when their ranges match testing commit 4f81c16f50baf6d5d8bfa6eef3250dcfa22cbc08 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 2e7d04b04acce59b5ec8e6ef45e1cec43a3a108b1009e2d226b0a8fadfa72ba0 all runs: crashed: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime representative crash: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime, types: [UBSAN] # git bisect bad 4f81c16f50baf6d5d8bfa6eef3250dcfa22cbc08 Bisecting: 2 revisions left to test after this (roughly 1 step) [e6f798225a31485e47a6e4f6aa07ee9fdf80c2cb] mm: Introduce VM_SPARSE kind and vm_area_[un]map_pages(). testing commit e6f798225a31485e47a6e4f6aa07ee9fdf80c2cb gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 27707256aed17a8ed3e2e4ebf9fb67648b46b9be0d5a7747af1f456b326bf31b all runs: OK false negative chance: 0.000 # git bisect good e6f798225a31485e47a6e4f6aa07ee9fdf80c2cb Bisecting: 0 revisions left to test after this (roughly 1 step) [011832b97b311bb9e3c27945bc0d1089a14209c9] bpf: Introduce may_goto instruction testing commit 011832b97b311bb9e3c27945bc0d1089a14209c9 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: b6bd49775a12799529a5a91954f79158184e94796171960863d711db4bdd1e4d all runs: crashed: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime representative crash: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime, types: [UBSAN] # git bisect bad 011832b97b311bb9e3c27945bc0d1089a14209c9 Bisecting: 0 revisions left to test after this (roughly 0 steps) [9a9d1d36050e486822dc54990c896761b04e7446] Merge branch 'mm-enforce-ioremap-address-space-and-introduce-sparse-vm_area' testing commit 9a9d1d36050e486822dc54990c896761b04e7446 gcc compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: dd75259f279286ca18d6163dbcf9f763fff957698a37396e4ee16c5829545ee5 all runs: OK false negative chance: 0.000 # git bisect good 9a9d1d36050e486822dc54990c896761b04e7446 011832b97b311bb9e3c27945bc0d1089a14209c9 is the first bad commit commit 011832b97b311bb9e3c27945bc0d1089a14209c9 Author: Alexei Starovoitov Date: Tue Mar 5 19:19:26 2024 -0800 bpf: Introduce may_goto instruction Introduce may_goto instruction that from the verifier pov is similar to open coded iterators bpf_for()/bpf_repeat() and bpf_loop() helper, but it doesn't iterate any objects. In assembly 'may_goto' is a nop most of the time until bpf runtime has to terminate the program for whatever reason. In the current implementation may_goto has a hidden counter, but other mechanisms can be used. For programs written in C the later patch introduces 'cond_break' macro that combines 'may_goto' with 'break' statement and has similar semantics: cond_break is a nop until bpf runtime has to break out of this loop. It can be used in any normal "for" or "while" loop, like for (i = zero; i < cnt; cond_break, i++) { The verifier recognizes that may_goto is used in the program, reserves additional 8 bytes of stack, initializes them in subprog prologue, and replaces may_goto instruction with: aux_reg = *(u64 *)(fp - 40) if aux_reg == 0 goto pc+off aux_reg -= 1 *(u64 *)(fp - 40) = aux_reg may_goto instruction can be used by LLVM to implement __builtin_memcpy, __builtin_strcmp. may_goto is not a full substitute for bpf_for() macro. bpf_for() doesn't have induction variable that verifiers sees, so 'i' in bpf_for(i, 0, 100) is seen as imprecise and bounded. But when the code is written as: for (i = 0; i < 100; cond_break, i++) the verifier see 'i' as precise constant zero, hence cond_break (aka may_goto) doesn't help to converge the loop. A static or global variable can be used as a workaround: static int zero = 0; for (i = zero; i < 100; cond_break, i++) // works! may_goto works well with arena pointers that don't need to be bounds checked on access. Load/store from arena returns imprecise unbounded scalar and loops with may_goto pass the verifier. Reserve new opcode BPF_JMP | BPF_JCOND for may_goto insn. JCOND stands for conditional pseudo jump. Since goto_or_nop insn was proposed, it may use the same opcode. may_goto vs goto_or_nop can be distinguished by src_reg: code = BPF_JMP | BPF_JCOND src_reg = 0 - may_goto src_reg = 1 - goto_or_nop Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Acked-by: Eduard Zingerman Acked-by: John Fastabend Tested-by: John Fastabend Link: https://lore.kernel.org/bpf/20240306031929.42666-2-alexei.starovoitov@gmail.com include/linux/bpf_verifier.h | 2 + include/uapi/linux/bpf.h | 5 ++ kernel/bpf/core.c | 1 + kernel/bpf/disasm.c | 4 + kernel/bpf/verifier.c | 163 +++++++++++++++++++++++++++++++++-------- tools/include/uapi/linux/bpf.h | 5 ++ 6 files changed, 150 insertions(+), 30 deletions(-) accumulated error probability: 0.00 culprit signature: b6bd49775a12799529a5a91954f79158184e94796171960863d711db4bdd1e4d parent signature: dd75259f279286ca18d6163dbcf9f763fff957698a37396e4ee16c5829545ee5 revisions tested: 21, total time: 7h4m12.013394999s (build: 1h54m2.28059476s, test: 2h7m23.970955755s) first bad commit: 011832b97b311bb9e3c27945bc0d1089a14209c9 bpf: Introduce may_goto instruction recipients (to): ["andrii@kernel.org" "ast@kernel.org" "eddyz87@gmail.com" "john.fastabend@gmail.com"] recipients (cc): [] crash: UBSAN: array-index-out-of-bounds in bpf_prog_select_runtime ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in kernel/bpf/core.c:2339:29 index 16 is out of range for type ' *[16]' CPU: 0 PID: 2789 Comm: syz-executor.0 Not tainted 6.8.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x3d/0x70 lib/dump_stack.c:106 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0xcb/0x100 lib/ubsan.c:347 bpf_prog_select_func kernel/bpf/core.c:2339 [inline] bpf_prog_select_runtime+0x17c/0x190 kernel/bpf/core.c:2370 bpf_prog_load+0x729/0xcb0 kernel/bpf/syscall.c:2847 __sys_bpf+0x57e/0x2770 kernel/bpf/syscall.c:5573 __do_sys_bpf kernel/bpf/syscall.c:5680 [inline] __se_sys_bpf kernel/bpf/syscall.c:5678 [inline] __x64_sys_bpf+0x19/0x30 kernel/bpf/syscall.c:5678 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x73/0x1b0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7f7989e1cda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f798999e0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f7989f4af80 RCX: 00007f7989e1cda9 RDX: 0000000000000048 RSI: 00000000200017c0 RDI: 0000000000000005 RBP: 00007f7989e6947a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f7989f4af80 R15: 00007ffffeb97bf8 ---[ end trace ]---