bisecting fixing commit since a1b977b49b66c75e6c51a515f6700371ae720217 building syzkaller on 4a77ae0bdc5cd75ebe88ce7c896aae6bbf457a29 testing commit a1b977b49b66c75e6c51a515f6700371ae720217 with gcc (GCC) 8.1.0 kernel signature: 7b3bcc57cbdec6951aefbca4f87669426b2135fc61df33d056e48d9a996f8dcc run #0: crashed: general protection fault in gfs2_ri_update run #1: crashed: general protection fault in gfs2_ri_update run #2: crashed: general protection fault in gfs2_ri_update run #3: crashed: general protection fault in gfs2_ri_update run #4: crashed: general protection fault in gfs2_ri_update run #5: crashed: general protection fault in gfs2_ri_update run #6: crashed: general protection fault in gfs2_rindex_update run #7: crashed: general protection fault in gfs2_ri_update run #8: crashed: general protection fault in gfs2_ri_update run #9: crashed: general protection fault in gfs2_ri_update testing current HEAD 4143d798313fffa39f05bf24dd560ace42225c26 testing commit 4143d798313fffa39f05bf24dd560ace42225c26 with gcc (GCC) 8.1.0 kernel signature: eb2fff24e871b6936abda9f888f797894a99b5d36d267392a415b2b59e4b063c all runs: OK # git bisect start 4143d798313fffa39f05bf24dd560ace42225c26 a1b977b49b66c75e6c51a515f6700371ae720217 Bisecting: 657 revisions left to test after this (roughly 9 steps) [964e25377fab8e9071c07d8cdf1c9a4fb079285e] xfs: fix brainos in the refcount scrubber's rmap fragment processor testing commit 964e25377fab8e9071c07d8cdf1c9a4fb079285e with gcc (GCC) 8.1.0 kernel signature: 90f9274cb874e0b7fa6dd4a0c9c7a814f5d6f8f7289b5a92f5650f1be5071588 all runs: crashed: general protection fault in gfs2_ri_update # git bisect good 964e25377fab8e9071c07d8cdf1c9a4fb079285e Bisecting: 328 revisions left to test after this (roughly 8 steps) [37172cffc6a4e5371c9a514ad6ab870108a73c9f] ALSA: pcm: oss: Fix potential out-of-bounds shift testing commit 37172cffc6a4e5371c9a514ad6ab870108a73c9f with gcc (GCC) 8.1.0 kernel signature: f9233599c704f89504a1302fc4fc967bb01904d7e9d4f2fd4ce37e58ae79bf2c all runs: OK # git bisect bad 37172cffc6a4e5371c9a514ad6ab870108a73c9f Bisecting: 164 revisions left to test after this (roughly 7 steps) [3afe38f6c3c6525d529db8e0fee89d1ad1fc345d] ALSA: hda/hdmi: fix incorrect locking in hdmi_pcm_close testing commit 3afe38f6c3c6525d529db8e0fee89d1ad1fc345d with gcc (GCC) 8.1.0 kernel signature: b0be139e5887ca7e0e8fec6e6ec6d02fdb4f60c27fdd6ecefa979e27290c22af all runs: crashed: general protection fault in gfs2_ri_update # git bisect good 3afe38f6c3c6525d529db8e0fee89d1ad1fc345d Bisecting: 82 revisions left to test after this (roughly 6 steps) [212b9a2c54b4203a9b0bbf202aa886203d315371] USB: serial: kl5kusb105: fix memleak on open testing commit 212b9a2c54b4203a9b0bbf202aa886203d315371 with gcc (GCC) 8.1.0 kernel signature: 1b0a0e9e1e4b22f2a177f302192f7ecfe81aa65de6e85fb623877f08fc9fdd9f all runs: crashed: general protection fault in gfs2_ri_update # git bisect good 212b9a2c54b4203a9b0bbf202aa886203d315371 Bisecting: 41 revisions left to test after this (roughly 5 steps) [1e2f19a1dc4190b7a391a15d01940e45ec49ad22] spi: bcm2835aux: Restore err assignment in bcm2835aux_spi_probe testing commit 1e2f19a1dc4190b7a391a15d01940e45ec49ad22 with gcc (GCC) 8.1.0 kernel signature: 59742f33ea969d09a49677998fc447f63615c3010bf5816384dce2abb877a875 all runs: OK # git bisect bad 1e2f19a1dc4190b7a391a15d01940e45ec49ad22 Bisecting: 20 revisions left to test after this (roughly 4 steps) [6bb78b3fff90fcf76991f689822ae58a4feee36d] x86/uprobes: Do not use prefixes.nbytes when looping over prefixes.bytes testing commit 6bb78b3fff90fcf76991f689822ae58a4feee36d with gcc (GCC) 8.1.0 kernel signature: 13d9493f81294ce528fb9402700c751e58b52c8410a0884ac920e54c60171c6a all runs: crashed: general protection fault in gfs2_ri_update # git bisect good 6bb78b3fff90fcf76991f689822ae58a4feee36d Bisecting: 10 revisions left to test after this (roughly 3 steps) [6790f8b9370bf83c6733a537414c7ff7d989be30] gfs2: check for empty rgrp tree in gfs2_ri_update testing commit 6790f8b9370bf83c6733a537414c7ff7d989be30 with gcc (GCC) 8.1.0 kernel signature: fcc0a3421929b4ab580fff428e1a05bacd8b2d698beca3b054b49298926f5dd9 all runs: OK # git bisect bad 6790f8b9370bf83c6733a537414c7ff7d989be30 Bisecting: 4 revisions left to test after this (roughly 2 steps) [234b432c7b6184b2d6c5ba2c55f0dd5023c0edf0] spi: Introduce device-managed SPI controller allocation testing commit 234b432c7b6184b2d6c5ba2c55f0dd5023c0edf0 with gcc (GCC) 8.1.0 kernel signature: 833a2dd16225f53e954ce56dbfa1f4bbf27328dc72d5f36fa19c699ef4996252 all runs: crashed: general protection fault in gfs2_ri_update # git bisect good 234b432c7b6184b2d6c5ba2c55f0dd5023c0edf0 Bisecting: 2 revisions left to test after this (roughly 1 step) [c886774bf5837cc726cffd77d33f85b33968e12d] spi: bcm2835: Fix use-after-free on unbind testing commit c886774bf5837cc726cffd77d33f85b33968e12d with gcc (GCC) 8.1.0 kernel signature: 833a2dd16225f53e954ce56dbfa1f4bbf27328dc72d5f36fa19c699ef4996252 run #0: crashed: general protection fault in gfs2_rindex_update run #1: crashed: general protection fault in gfs2_ri_update run #2: crashed: general protection fault in gfs2_ri_update run #3: crashed: general protection fault in gfs2_ri_update run #4: crashed: general protection fault in gfs2_ri_update run #5: crashed: general protection fault in gfs2_ri_update run #6: crashed: general protection fault in gfs2_ri_update run #7: crashed: general protection fault in gfs2_ri_update run #8: crashed: general protection fault in gfs2_rindex_update run #9: crashed: general protection fault in gfs2_ri_update # git bisect good c886774bf5837cc726cffd77d33f85b33968e12d Bisecting: 0 revisions left to test after this (roughly 1 step) [1093c9a445ae0da5a3faedb7cc5b2f70cf05d82c] tracing: Fix userstacktrace option for instances testing commit 1093c9a445ae0da5a3faedb7cc5b2f70cf05d82c with gcc (GCC) 8.1.0 kernel signature: 88b1b04e8154db11b1264dffeebee8f36bdde464d714e536d4fb8358b6b6a450 all runs: crashed: general protection fault in gfs2_ri_update # git bisect good 1093c9a445ae0da5a3faedb7cc5b2f70cf05d82c 6790f8b9370bf83c6733a537414c7ff7d989be30 is the first bad commit commit 6790f8b9370bf83c6733a537414c7ff7d989be30 Author: Bob Peterson Date: Tue Nov 24 10:44:36 2020 -0500 gfs2: check for empty rgrp tree in gfs2_ri_update commit 778721510e84209f78e31e2ccb296ae36d623f5e upstream. If gfs2 tries to mount a (corrupt) file system that has no resource groups it still tries to set preferences on the first one, which causes a kernel null pointer dereference. This patch adds a check to function gfs2_ri_update so this condition is detected and reported back as an error. Reported-by: syzbot+e3f23ce40269a4c9053a@syzkaller.appspotmail.com Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher Signed-off-by: Greg Kroah-Hartman fs/gfs2/rgrp.c | 4 ++++ 1 file changed, 4 insertions(+) culprit signature: fcc0a3421929b4ab580fff428e1a05bacd8b2d698beca3b054b49298926f5dd9 parent signature: 88b1b04e8154db11b1264dffeebee8f36bdde464d714e536d4fb8358b6b6a450 revisions tested: 12, total time: 2h47m59.107293167s (build: 1h50m4.403094335s, test: 56m40.889942664s) first good commit: 6790f8b9370bf83c6733a537414c7ff7d989be30 gfs2: check for empty rgrp tree in gfs2_ri_update recipients (to): ["agruenba@redhat.com" "gregkh@linuxfoundation.org" "rpeterso@redhat.com"] recipients (cc): []