Re: [syzbot] [reiserfs?] KASAN: null-ptr-deref Read in do_journal_end (2)

10 views
Skip to first unread message

syzbot

unread,
Jun 30, 2023, 11:13:37 AM6/30/23
to ghanda...@gmail.com, syzkall...@googlegroups.com, syzk...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to checkout kernel repo https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/-master: failed to run ["git" "fetch" "--force" "4d52a57a3858a6eee0d0b25cc3a0c9533f747d8f" "-master"]: exit status 129
error: unknown switch `s'
usage: git fetch [<options>] [<repository> [<refspec>...]]
or: git fetch [<options>] <group>
or: git fetch --multiple [<options>] [(<repository> | <group>)...]
or: git fetch --all [<options>]

-v, --verbose be more verbose
-q, --quiet be more quiet
--all fetch from all remotes
--set-upstream set upstream for git pull/fetch
-a, --append append to .git/FETCH_HEAD instead of overwriting
--atomic use atomic transaction to update references
--upload-pack <path> path to upload pack on remote end
-f, --force force overwrite of local reference
-m, --multiple fetch from multiple remotes
-t, --tags fetch all tags and associated objects
-n do not fetch all tags (--no-tags)
-j, --jobs <n> number of submodules fetched in parallel
--prefetch modify the refspec to place all refs within refs/prefetch/
-p, --prune prune remote-tracking branches no longer on remote
-P, --prune-tags prune local tags no longer on remote and clobber changed tags
--recurse-submodules[=<on-demand>]
control recursive fetching of submodules
--dry-run dry run
--write-fetch-head write fetched references to the FETCH_HEAD file
-k, --keep keep downloaded pack
-u, --update-head-ok allow updating of HEAD ref
--progress force progress reporting
--depth <depth> deepen history of shallow clone
--shallow-since <time>
deepen history of shallow repository based on time
--shallow-exclude <revision>
deepen history of shallow clone, excluding rev
--deepen <n> deepen history of shallow clone
--unshallow convert to a complete repository
--refetch re-fetch without negotiating common commits
--update-shallow accept refs that update .git/shallow
--refmap <refmap> specify fetch refmap
-o, --server-option <server-specific>
option to transmit
-4, --ipv4 use IPv4 addresses only
-6, --ipv6 use IPv6 addresses only
--negotiation-tip <revision>
report that we have only objects reachable from this object
--negotiate-only do not fetch a packfile; instead, print ancestors of negotiation tips
--filter <args> object filtering
--auto-maintenance run 'maintenance --auto' after fetching
--auto-gc run 'maintenance --auto' after fetching
--show-forced-updates
check for forced-updates on all updated branches
--write-commit-graph write the commit-graph after fetching
--stdin accept refspecs from stdin




Tested on:

commit: [unknown
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git -master
dashboard link: https://syzkaller.appspot.com/bug?extid=845cd8e5c47f2a125683
compiler:

Note: no patches were applied.

syzbot

unread,
Jun 30, 2023, 1:01:26 PM6/30/23
to ghanda...@gmail.com, syzkall...@googlegroups.com, syzk...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

2.319364][ T0] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, vmalloc hugepage)
[ 2.325067][ T0] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, vmalloc hugepage)
[ 2.326003][ T0] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, vmalloc)
[ 2.327988][ T0] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, vmalloc)
[ 2.333065][ T0] Running RCU synchronous self tests
[ 2.333996][ T0] Running RCU synchronous self tests
[ 2.457676][ T1] smpboot: CPU0: Intel(R) Xeon(R) CPU @ 2.20GHz (family: 0x6, model: 0x4f, stepping: 0x0)
[ 2.463285][ T1] RCU Tasks: Setting shift to 1 and lim to 1 rcu_task_cb_adjust=1.
[ 2.465458][ T1] RCU Tasks Trace: Setting shift to 1 and lim to 1 rcu_task_cb_adjust=1.
[ 2.465844][ T1] Running RCU-tasks wait API self tests
[ 2.595929][ T1] Performance Events: unsupported p6 CPU model 79 no PMU driver, software events only.
[ 2.597910][ T1] signal: max sigframe size: 1776
[ 2.599615][ T1] rcu: Hierarchical SRCU implementation.
[ 2.600520][ T1] rcu: Max phase no-delay instances is 1000.
[ 2.605982][ T1] NMI watchdog: Perf NMI watchdog permanently disabled
[ 2.608153][ T1] smp: Bringing up secondary CPUs ...
[ 2.611282][ T1] smpboot: x86: Booting SMP configuration:
[ 2.612336][ T1] .... node #0, CPUs: #1
[ 2.612719][ T1] MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.
[ 2.615793][ T1] TAA CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/tsx_async_abort.html for more details.
[ 2.619760][ T1] MMIO Stale Data CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/processor_mmio_stale_data.html for more details.
[ 2.625816][ T1] smp: Brought up 2 nodes, 2 CPUs
[ 2.627150][ T1] smpboot: Max logical packages: 1
[ 2.628568][ T1] smpboot: Total of 2 processors activated (8800.76 BogoMIPS)
[ 2.632736][ T1] devtmpfs: initialized
[ 2.635810][ T14] Callback from call_rcu_tasks_trace() invoked.
[ 2.632736][ T1] x86/mm: Memory block size: 128MB
[ 2.668839][ T1] Running RCU synchronous self tests
[ 2.670213][ T1] Running RCU synchronous self tests
[ 2.676109][ T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 2.678618][ T1] futex hash table entries: 512 (order: 4, 65536 bytes, vmalloc)
[ 2.682944][ T1] PM: RTC time: 16:59:57, date: 2023-06-30
[ 2.692752][ T1] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 2.706222][ T1] audit: initializing netlink subsys (disabled)
[ 2.709472][ T1] thermal_sys: Registered thermal governor 'step_wise'
[ 2.709488][ T1] thermal_sys: Registered thermal governor 'user_space'
[ 2.715748][ T27] audit: type=2000 audit(1688144397.949:1): state=initialized audit_enabled=0 res=1
[ 2.719194][ T1] cpuidle: using governor menu
[ 2.719194][ T1] NET: Registered PF_QIPCRTR protocol family
[ 2.720968][ T1] PCI: Using configuration type 1 for base access
[ 2.725701][ T1] WARNING: workqueue cpumask: online intersect > possible intersect
[ 2.735640][ T1] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[ 2.735640][ T1] HugeTLB: 16380 KiB vmemmap can be freed for a 1.00 GiB page
[ 2.735640][ T1] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[ 2.735640][ T1] HugeTLB: 28 KiB vmemmap can be freed for a 2.00 MiB page
[ 2.757359][ T1] cryptd: max_cpu_qlen set to 1000
[ 2.765638][ T1] raid6: skipped pq benchmark and selected avx2x4
[ 2.765638][ T1] raid6: using avx2x2 recovery algorithm
[ 2.765638][ T1] ACPI: Added _OSI(Module Device)
[ 2.765638][ T1] ACPI: Added _OSI(Processor Device)
[ 2.765666][ T1] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 2.766872][ T1] ACPI: Added _OSI(Processor Aggregator Device)
[ 2.816014][ T13] Callback from call_rcu_tasks() invoked.
[ 2.889857][ T1] ACPI: 2 ACPI AML tables successfully acquired and loaded
[ 2.989821][ T1] ACPI: Interpreter enabled
[ 2.991526][ T1] ACPI: PM: (supports S0 S3 S4 S5)
[ 2.992683][ T1] ACPI: Using IOAPIC for interrupt routing
[ 2.994287][ T1] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 2.995643][ T1] PCI: Ignoring E820 reservations for host bridge windows
[ 3.001309][ T1] ACPI: Enabled 16 GPEs in block 00 to 0F
[ 3.150546][ T1] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 3.152591][ T1] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3]
[ 3.154245][ T1] acpi PNP0A03:00: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI]
[ 3.156280][ T1] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended configuration space under this bridge
[ 3.173319][ T1] PCI host bridge to bus 0000:00
[ 3.174535][ T1] pci_bus 0000:00: Unknown NUMA node; performance will be reduced
[ 3.175662][ T1] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 3.177394][ T1] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 3.179082][ T1] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 3.181129][ T1] pci_bus 0000:00: root bus resource [mem 0xc0000000-0xfebfefff window]
[ 3.182669][ T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 3.184540][ T1] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
[ 3.201755][ T1] pci 0000:00:01.0: [8086:7110] type 00 class 0x060100
[ 3.234254][ T1] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
[ 3.272998][ T1] pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI
[ 3.279401][ T1] pci 0000:00:03.0: [1af4:1004] type 00 class 0x000000
[ 3.285654][ T1] pci 0000:00:03.0: reg 0x10: [io 0xc000-0xc03f]
[ 3.298034][ T1] pci 0000:00:03.0: reg 0x14: [mem 0xfe800000-0xfe80007f]
[ 3.333774][ T1] pci 0000:00:04.0: [1af4:1000] type 00 class 0x020000
[ 3.350212][ T1] pci 0000:00:04.0: reg 0x10: [io 0xc040-0xc07f]
[ 3.361366][ T1] pci 0000:00:04.0: reg 0x14: [mem 0xfe801000-0xfe80107f]
[ 3.384707][ T1] pci 0000:00:05.0: [1ae0:a002] type 00 class 0x030000
[ 3.404980][ T1] pci 0000:00:05.0: reg 0x10: [mem 0xfe000000-0xfe7fffff]
[ 3.438344][ T1] pci 0000:00:05.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[ 3.446030][ T1] pci 0000:00:06.0: [1af4:1002] type 00 class 0x00ff00
[ 3.462301][ T1] pci 0000:00:06.0: reg 0x10: [io 0xc080-0xc09f]
[ 3.482836][ T1] pci 0000:00:06.0: reg 0x14: [mem 0xfe802000-0xfe80207f]
[ 3.513620][ T1] pci 0000:00:07.0: [1af4:1005] type 00 class 0x00ff00
[ 3.525653][ T1] pci 0000:00:07.0: reg 0x10: [io 0xc0a0-0xc0bf]
[ 3.534457][ T1] pci 0000:00:07.0: reg 0x14: [mem 0xfe803000-0xfe80303f]
[ 3.579593][ T1] ACPI: PCI: Interrupt link LNKA configured for IRQ 10
[ 3.587549][ T1] ACPI: PCI: Interrupt link LNKB configured for IRQ 10
[ 3.596333][ T1] ACPI: PCI: Interrupt link LNKC configured for IRQ 11
[ 3.604392][ T1] ACPI: PCI: Interrupt link LNKD configured for IRQ 11
[ 3.609438][ T1] ACPI: PCI: Interrupt link LNKS configured for IRQ 9
[ 3.635635][ T1] iommu: Default domain type: Translated
[ 3.635635][ T1] iommu: DMA domain TLB invalidation policy: lazy mode
[ 3.636914][ T1] SCSI subsystem initialized
[ 3.645638][ T1] ACPI: bus type USB registered
[ 3.645638][ T1] usbcore: registered new interface driver usbfs
[ 3.645678][ T1] usbcore: registered new interface driver hub
[ 3.647914][ T1] usbcore: registered new device driver usb
[ 3.652292][ T1] mc: Linux media interface: v0.10
[ 3.654434][ T1] videodev: Linux video capture interface: v2.00
[ 3.656609][ T1] pps_core: LinuxPPS API ver. 1 registered
[ 3.658121][ T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giom...@linux.it>
[ 3.660499][ T1] PTP clock support registered
[ 3.665896][ T1] EDAC MC: Ver: 3.0.0
[ 3.675651][ T1] Advanced Linux Sound Architecture Driver Initialized.
[ 3.676665][ T1] Bluetooth: Core ver 2.22
[ 3.677915][ T1] NET: Registered PF_BLUETOOTH protocol family
[ 3.679589][ T1] Bluetooth: HCI device and connection manager initialized
[ 3.681148][ T1] Bluetooth: HCI socket layer initialized
[ 3.682189][ T1] Bluetooth: L2CAP socket layer initialized
[ 3.683276][ T1] Bluetooth: SCO socket layer initialized
[ 3.684219][ T1] NET: Registered PF_ATMPVC protocol family
[ 3.685156][ T1] NET: Registered PF_ATMSVC protocol family
[ 3.686190][ T1] NetLabel: Initializing
[ 3.686847][ T1] NetLabel: domain hash size = 128
[ 3.687621][ T1] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
[ 3.689114][ T1] NetLabel: unlabeled traffic allowed by default
[ 3.692675][ T1] nfc: nfc_init: NFC Core ver 0.1
[ 3.693948][ T1] NET: Registered PF_NFC protocol family
[ 3.694997][ T1] PCI: Using ACPI for IRQ routing
[ 3.696757][ T1] pci 0000:00:05.0: vgaarb: setting as boot VGA device
[ 3.697960][ T1] pci 0000:00:05.0: vgaarb: bridge control possible
[ 3.699123][ T1] pci 0000:00:05.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[ 3.700685][ T1] vgaarb: loaded
[ 3.715636][ T1] clocksource: Switched to clocksource kvm-clock
[ 3.717614][ T1] VFS: Disk quotas dquot_6.6.0
[ 3.723638][ T1] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 3.725617][ T1] FS-Cache: Loaded
[ 3.727990][ T1] CacheFiles: Loaded
[ 3.729376][ T1] TOMOYO: 2.6.0
[ 3.730056][ T1] Mandatory Access Control activated.
[ 3.735454][ T1] AppArmor: AppArmor Filesystem Enabled
[ 3.737327][ T1] pnp: PnP ACPI init
[ 3.761313][ T1] pnp: PnP ACPI: found 7 devices
[ 3.812796][ T1] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 3.816291][ T1] NET: Registered PF_INET protocol family
[ 3.823183][ T1] IP idents hash table entries: 131072 (order: 8, 1048576 bytes, vmalloc)
[ 3.835564][ T1] tcp_listen_portaddr_hash hash table entries: 4096 (order: 6, 294912 bytes, vmalloc)
[ 3.840456][ T1] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, vmalloc)
[ 3.845321][ T1] TCP established hash table entries: 65536 (order: 7, 524288 bytes, vmalloc)
[ 3.861449][ T1] TCP bind hash table entries: 65536 (order: 11, 9437184 bytes, vmalloc hugepage)
[ 3.878734][ T1] TCP: Hash tables configured (established 65536 bind 65536)
[ 3.885411][ T1] MPTCP token hash table entries: 8192 (order: 7, 720896 bytes, vmalloc)
[ 3.890776][ T1] UDP hash table entries: 4096 (order: 7, 655360 bytes, vmalloc)
[ 3.896368][ T1] UDP-Lite hash table entries: 4096 (order: 7, 655360 bytes, vmalloc)
[ 3.900261][ T1] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 3.904225][ T1] RPC: Registered named UNIX socket transport module.
[ 3.905595][ T1] RPC: Registered udp transport module.
[ 3.906588][ T1] RPC: Registered tcp transport module.
[ 3.907579][ T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 3.912075][ T1] NET: Registered PF_XDP protocol family
[ 3.914094][ T1] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window]
[ 3.915869][ T1] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window]
[ 3.917689][ T1] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[ 3.919096][ T1] pci_bus 0000:00: resource 7 [mem 0xc0000000-0xfebfefff window]
[ 3.921907][ T1] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 3.923713][ T1] PCI: CLS 0 bytes, default 64
[ 3.931737][ T1] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 3.933645][ T1] software IO TLB: mapped [mem 0x00000000b5800000-0x00000000b9800000] (64MB)
[ 3.935957][ T1] ACPI: bus type thunderbolt registered
[ 3.945614][ T58] kworker/u4:2 (58) used greatest stack depth: 26744 bytes left
[ 3.948128][ T57] kworker/u4:2 (57) used greatest stack depth: 26704 bytes left
[ 3.948227][ T1] RAPL PMU: API unit is 2^-32 Joules, 0 fixed counters, 10737418240 ms ovfl timer
[ 3.973651][ T1] kvm_amd: SVM not supported by CPU 0, not amd or hygon
[ 3.975115][ T1] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x1fb6e835671, max_idle_ns: 440795274684 ns
[ 3.977086][ T1] clocksource: Switched to clocksource tsc
[ 3.980765][ T59] kworker/u4:2 (59) used greatest stack depth: 25680 bytes left
[ 3.989326][ T1] AVX2 instructions are not detected.
[ 3.990533][ T1] AVX or AES-NI instructions are not detected.
[ 3.993191][ T1] AVX2 or AES-NI instructions are not detected.
[ 3.995792][ T1] AVX or AES-NI instructions are not detected.
[ 3.996875][ T1] AVX2 or AES-NI instructions are not detected.
[ 3.998280][ T1] AVX or AES-NI instructions are not detected.


syzkaller build log:
go env (err=<nil>)
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/syzkaller/.cache/go-build"
GOENV="/syzkaller/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/syzkaller/jobs/linux/gopath/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/syzkaller/jobs/linux/gopath"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/syzkaller/jobs/linux/gopath/src/github.com/google/syzkaller/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1568710010=/tmp/go-build -gno-record-gcc-switches"

git status (err=<nil>)
HEAD detached at f0036e181
nothing to commit, working tree clean


tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Makefile:32: run command via tools/syz-env for best compatibility, see:
Makefile:33: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen
make .descriptions
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
bin/syz-sysgen
touch .descriptions
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=f0036e181e274023235289be91e334cb7507eaa6 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20230103-110812'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-fuzzer github.com/google/syzkaller/syz-fuzzer
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=f0036e181e274023235289be91e334cb7507eaa6 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20230103-110812'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-execprog github.com/google/syzkaller/tools/syz-execprog
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=f0036e181e274023235289be91e334cb7507eaa6 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20230103-110812'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-stress github.com/google/syzkaller/tools/syz-stress
mkdir -p ./bin/linux_amd64
gcc -o ./bin/linux_amd64/syz-executor executor/executor.cc \
-m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -static-pie -fpermissive -w -DGOOS_linux=1 -DGOARCH_amd64=1 \
-DHOSTGOOS_linux=1 -DGIT_REVISION=\"f0036e181e274023235289be91e334cb7507eaa6\"


Error text is too large and was truncated, full error text is at:
https://syzkaller.appspot.com/x/error.txt?x=16e099f0a80000


Tested on:

commit: e55e5df1 csky: fix up lock_mm_and_find_vma() conversion
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
kernel config: https://syzkaller.appspot.com/x/.config?x=8ccbf6b07a451a3d
dashboard link: https://syzkaller.appspot.com/bug?extid=845cd8e5c47f2a125683
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

syzbot

unread,
Jun 30, 2023, 1:21:35 PM6/30/23
to ghanda...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

UBSAN: array-index-out-of-bounds in alloc_pid

================================================================================
UBSAN: array-index-out-of-bounds in kernel/pid.c:244:3
index 1 is out of range for type 'struct upid[1]'
CPU: 1 PID: 4990 Comm: syz-executor.0 Not tainted 6.4.0-syzkaller-08686-ge55e5df193d2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Call Trace:
<TASK>
dump_stack_lvl+0x1b5/0x2a0
__ubsan_handle_out_of_bounds+0xf0/0x120
alloc_pid+0x405/0xc40
copy_process+0x1f6f/0x4390
kernel_clone+0x209/0x7f0
__x64_sys_clone+0x26d/0x2f0
do_syscall_64+0x41/0xc0
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f134ec89ddb
Code: ed 0f 85 60 01 00 00 64 4c 8b 0c 25 10 00 00 00 45 31 c0 4d 8d 91 d0 02 00 00 31 d2 31 f6 bf 11 00 20 01 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 89 00 00 00 41 89 c5 85 c0 0f 85 90 00 00
RSP: 002b:00007fffcc1a3ae0 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007fffcc1a4138 RCX: 00007f134ec89ddb
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000555556d2f400
R10: 0000555556d2f6d0 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffcc1a3bd0 R14: 00007f134edac9d8 R15: 000000000000000c
</TASK>
================================================================================


Warning: Permanently added '10.128.1.95' (ECDSA) to the list of known hosts.
2023/06/30 17:20:18 fuzzer started
2023/06/30 17:20:18 connecting to host at 10.128.0.163:38891
2023/06/30 17:20:18 checking machine...
2023/06/30 17:20:18 checking revisions...
2023/06/30 17:20:19 testing simple program...
syzkaller login: [ 57.135410][ T4989] cgroup: Unknown subsys name 'net'
[ 57.254319][ T4989] cgroup: Unknown subsys name 'rlimit'
[ 57.352152][ T4982] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=4982 'syz-fuzzer'
[ 57.444587][ T4990] ================================================================================
[ 57.455587][ T4990] UBSAN: array-index-out-of-bounds in kernel/pid.c:244:3
[ 57.462728][ T4990] index 1 is out of range for type 'struct upid[1]'
[ 57.470487][ T4990] CPU: 1 PID: 4990 Comm: syz-executor.0 Not tainted 6.4.0-syzkaller-08686-ge55e5df193d2 #0
[ 57.480948][ T4990] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
[ 57.491032][ T4990] Call Trace:
[ 57.494413][ T4990] <TASK>
[ 57.497517][ T4990] dump_stack_lvl+0x1b5/0x2a0
[ 57.502236][ T4990] ? nf_tcp_handle_invalid+0x650/0x650
[ 57.507957][ T4990] ? vsnprintf+0x17f/0x1d80
[ 57.512829][ T4990] ? panic+0x6f0/0x6f0
[ 57.517541][ T4990] ? local_lock_release+0x96/0x170
[ 57.523482][ T4990] ? __lock_acquire+0x7ef0/0x7ef0
[ 57.528726][ T4990] __ubsan_handle_out_of_bounds+0xf0/0x120
[ 57.534761][ T4990] ? _raw_spin_unlock_irq+0x23/0x50
[ 57.540110][ T4990] ? lockdep_hardirqs_on+0x90/0x130
[ 57.545881][ T4990] alloc_pid+0x405/0xc40
[ 57.550661][ T4990] copy_process+0x1f6f/0x4390
[ 57.555462][ T4990] ? verify_lock_unused+0x140/0x140
[ 57.561249][ T4990] ? perf_event_namespaces+0x1f6/0xc60
[ 57.566859][ T4990] ? __pidfd_prepare+0x140/0x140
[ 57.571916][ T4990] kernel_clone+0x209/0x7f0
[ 57.576462][ T4990] ? ksys_unshare+0x8ef/0xb20
[ 57.581486][ T4990] ? create_io_thread+0x1a0/0x1a0
[ 57.586619][ T4990] ? do_raw_spin_lock+0x14d/0x3a0
[ 57.591645][ T4990] ? do_raw_spin_unlock+0x13b/0x8b0
[ 57.596928][ T4990] __x64_sys_clone+0x26d/0x2f0
[ 57.601698][ T4990] ? __do_sys_vfork+0x120/0x120
[ 57.606636][ T4990] ? lockdep_hardirqs_on_prepare+0x418/0x780
[ 57.612707][ T4990] ? syscall_enter_from_user_mode+0x32/0x230
[ 57.619293][ T4990] ? lockdep_hardirqs_on+0x90/0x130
[ 57.624591][ T4990] ? syscall_enter_from_user_mode+0x32/0x230
[ 57.631100][ T4990] do_syscall_64+0x41/0xc0
[ 57.635608][ T4990] entry_SYSCALL_64_after_hwframe+0x63/0xcd
[ 57.641684][ T4990] RIP: 0033:0x7f134ec89ddb
[ 57.646265][ T4990] Code: ed 0f 85 60 01 00 00 64 4c 8b 0c 25 10 00 00 00 45 31 c0 4d 8d 91 d0 02 00 00 31 d2 31 f6 bf 11 00 20 01 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 89 00 00 00 41 89 c5 85 c0 0f 85 90 00 00
[ 57.666479][ T4990] RSP: 002b:00007fffcc1a3ae0 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
[ 57.675588][ T4990] RAX: ffffffffffffffda RBX: 00007fffcc1a4138 RCX: 00007f134ec89ddb
[ 57.683725][ T4990] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
[ 57.691779][ T4990] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000555556d2f400
[ 57.700483][ T4990] R10: 0000555556d2f6d0 R11: 0000000000000246 R12: 0000000000000000
[ 57.709040][ T4990] R13: 00007fffcc1a3bd0 R14: 00007f134edac9d8 R15: 000000000000000c
[ 57.717293][ T4990] </TASK>
[ 57.722333][ T4990] ================================================================================
[ 57.732896][ T4990] Kernel panic - not syncing: UBSAN: panic_on_warn set ...
[ 57.740372][ T4990] CPU: 0 PID: 4990 Comm: syz-executor.0 Not tainted 6.4.0-syzkaller-08686-ge55e5df193d2 #0
[ 57.750636][ T4990] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
[ 57.761035][ T4990] Call Trace:
[ 57.764323][ T4990] <TASK>
[ 57.767271][ T4990] dump_stack_lvl+0x1b5/0x2a0
[ 57.772068][ T4990] ? nf_tcp_handle_invalid+0x650/0x650
[ 57.777755][ T4990] ? panic+0x6f0/0x6f0
[ 57.781831][ T4990] ? vscnprintf+0x5d/0x80
[ 57.786157][ T4990] panic+0x2b4/0x6f0
[ 57.790140][ T4990] ? check_panic_on_warn+0x21/0xa0
[ 57.795269][ T4990] ? __memcpy_flushcache+0x2b0/0x2b0
[ 57.800579][ T4990] ? dump_stack_lvl+0x20f/0x2a0
[ 57.805551][ T4990] ? local_lock_release+0x96/0x170
[ 57.810868][ T4990] ? __lock_acquire+0x7ef0/0x7ef0
[ 57.816419][ T4990] check_panic_on_warn+0x82/0xa0
[ 57.821460][ T4990] __ubsan_handle_out_of_bounds+0x110/0x120
[ 57.827548][ T4990] ? _raw_spin_unlock_irq+0x23/0x50
[ 57.832837][ T4990] ? lockdep_hardirqs_on+0x90/0x130
[ 57.838049][ T4990] alloc_pid+0x405/0xc40
[ 57.842592][ T4990] copy_process+0x1f6f/0x4390
[ 57.847622][ T4990] ? verify_lock_unused+0x140/0x140
[ 57.853012][ T4990] ? perf_event_namespaces+0x1f6/0xc60
[ 57.858553][ T4990] ? __pidfd_prepare+0x140/0x140
[ 57.863587][ T4990] kernel_clone+0x209/0x7f0
[ 57.868266][ T4990] ? ksys_unshare+0x8ef/0xb20
[ 57.873207][ T4990] ? create_io_thread+0x1a0/0x1a0
[ 57.878212][ T4990] ? do_raw_spin_lock+0x14d/0x3a0
[ 57.883573][ T4990] ? do_raw_spin_unlock+0x13b/0x8b0
[ 57.889123][ T4990] __x64_sys_clone+0x26d/0x2f0
[ 57.894131][ T4990] ? __do_sys_vfork+0x120/0x120
[ 57.899136][ T4990] ? lockdep_hardirqs_on_prepare+0x418/0x780
[ 57.905546][ T4990] ? syscall_enter_from_user_mode+0x32/0x230
[ 57.911653][ T4990] ? lockdep_hardirqs_on+0x90/0x130
[ 57.917142][ T4990] ? syscall_enter_from_user_mode+0x32/0x230
[ 57.923851][ T4990] do_syscall_64+0x41/0xc0
[ 57.928492][ T4990] entry_SYSCALL_64_after_hwframe+0x63/0xcd
[ 57.935555][ T4990] RIP: 0033:0x7f134ec89ddb
[ 57.940285][ T4990] Code: ed 0f 85 60 01 00 00 64 4c 8b 0c 25 10 00 00 00 45 31 c0 4d 8d 91 d0 02 00 00 31 d2 31 f6 bf 11 00 20 01 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 89 00 00 00 41 89 c5 85 c0 0f 85 90 00 00
[ 57.963477][ T4990] RSP: 002b:00007fffcc1a3ae0 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
[ 57.972436][ T4990] RAX: ffffffffffffffda RBX: 00007fffcc1a4138 RCX: 00007f134ec89ddb
[ 57.980766][ T4990] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
[ 57.990947][ T4990] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000555556d2f400
[ 57.999381][ T4990] R10: 0000555556d2f6d0 R11: 0000000000000246 R12: 0000000000000000
[ 58.008258][ T4990] R13: 00007fffcc1a3bd0 R14: 00007f134edac9d8 R15: 000000000000000c
[ 58.016535][ T4990] </TASK>
[ 58.019969][ T4990] Kernel Offset: disabled
[ 58.024763][ T4990] Rebooting in 86400 seconds..


syzkaller build log:
go env (err=<nil>)
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/syzkaller/.cache/go-build"
GOENV="/syzkaller/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/syzkaller/jobs-2/linux/gopath/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/syzkaller/jobs-2/linux/gopath"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/syzkaller/jobs-2/linux/gopath/src/github.com/google/syzkaller/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1528289596=/tmp/go-build -gno-record-gcc-switches"

git status (err=<nil>)
HEAD detached at f0036e181
nothing to commit, working tree clean


tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Makefile:32: run command via tools/syz-env for best compatibility, see:
Makefile:33: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen
make .descriptions
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
bin/syz-sysgen
touch .descriptions
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=f0036e181e274023235289be91e334cb7507eaa6 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20230103-110812'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-fuzzer github.com/google/syzkaller/syz-fuzzer
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=f0036e181e274023235289be91e334cb7507eaa6 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20230103-110812'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-execprog github.com/google/syzkaller/tools/syz-execprog
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=f0036e181e274023235289be91e334cb7507eaa6 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20230103-110812'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-stress github.com/google/syzkaller/tools/syz-stress
mkdir -p ./bin/linux_amd64
gcc -o ./bin/linux_amd64/syz-executor executor/executor.cc \
-m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -static-pie -fpermissive -w -DGOOS_linux=1 -DGOARCH_amd64=1 \
-DHOSTGOOS_linux=1 -DGIT_REVISION=\"f0036e181e274023235289be91e334cb7507eaa6\"



Reply all
Reply to author
Forward
0 new messages