From 8ab55d0eede313b6ecc94ec419a490bbe92d27de Mon Sep 17 00:00:00 2001 From: Sabyrzhan Tasbolatov Date: Tue, 10 Sep 2024 22:01:03 +0500 Subject: pkg/report: filter out false reboot reports Strict regexp rules to avoid false reboot reports as "Booting the kernel." should always start from the start and at the end of line. Also addressed in unit test the previous fix in https://github.com/google/syzkaller/commit/026e2200. Fixes: https://github.com/google/syzkaller/issues/3955 --- pkg/report/linux.go | 4 ++-- pkg/report/testdata/linux/report/722 | 2 ++ pkg/report/testdata/linux/report/723 | 2 ++ pkg/report/testdata/linux/report/724 | 6 ++++++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 pkg/report/testdata/linux/report/722 create mode 100644 pkg/report/testdata/linux/report/723 create mode 100644 pkg/report/testdata/linux/report/724 diff --git a/pkg/report/linux.go b/pkg/report/linux.go index 1ac1b8ee9..8a6cc7573 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -2387,7 +2387,7 @@ var linuxOopses = append([]*oops{ []byte("Booting the kernel."), []oopsFormat{ { - title: compile("Booting the kernel."), + title: compile("^Booting the kernel"), fmt: "unexpected kernel reboot", noStackTrace: true, reportType: crash.UnexpectedReboot, @@ -2397,7 +2397,7 @@ var linuxOopses = append([]*oops{ // These may appear on the same line when the fuzzer reads from the console the existing // boot message and then pass it as mount option, kernel then prints it back // as an invalid mount option and we detect false reboot. - compile("Parsing ELF|Decompressing Linux"), + compile("Parsing ELF|Decompressing Linux|Unknown parameter '"), }, crash.UnknownType, }, diff --git a/pkg/report/testdata/linux/report/722 b/pkg/report/testdata/linux/report/722 new file mode 100644 index 000000000..8e8ea5486 --- /dev/null +++ b/pkg/report/testdata/linux/report/722 @@ -0,0 +1,2 @@ + +[ 1164.176368][T16664] xfs: Unknown parameter ' Booting the kernel. ' diff --git a/pkg/report/testdata/linux/report/723 b/pkg/report/testdata/linux/report/723 new file mode 100644 index 000000000..ab4ac12c4 --- /dev/null +++ b/pkg/report/testdata/linux/report/723 @@ -0,0 +1,2 @@ + +[ 433.233894][T22566] fuse: Unknown parameter ' output: 0x0000000001000000 output_len: 0x000000000e544ad8 kernel_total_size: 0x000000000fa26000 needed_size: 0x000000000fc00000 trampoline_32bit: 0x000000000009d000 Decompressing Linux... Parsing ELF... done. Booting the kernel. diff --git a/pkg/report/testdata/linux/report/724 b/pkg/report/testdata/linux/report/724 new file mode 100644 index 000000000..b6ae9deb0 --- /dev/null +++ b/pkg/report/testdata/linux/report/724 @@ -0,0 +1,6 @@ + +Decompressing Linux... Parsing ELF... Performing relocations... done. +Booting the kernel (entry_offset: 0x0000000000000000). +[ 0.000000] Linux version 6.8.0 (dvyukov@dvyukov-glaptop2) (gcc (Debian 13.2.0-10) 13.2.0, GNU ld (GNU Binutils for Debian) 2.41.90.20240122) #1 SMP PREEMP4 +[ 0.000000] Command line: console=ttyS0 oops=panic panic_on_warn=1 panic=86400 earlyprintk=serial net.ifnames=0 biosdevname=0 root=/dev/sda1 +[ 0.000000] BIOS-provided physical RAM map: -- cgit mrf-deployment