one of the things the fuzzer is doing is this:
12:43:53 executing program 1:
compat_50_mknod(&(0x7f0000000000)='./file0\x00', 0x2001, 0x400)
r0 = open$dir(&(0x7f0000000000)='./file0\x00', 0x2, 0x0)
r1 = open$dir(&(0x7f0000000180)='./file0\x00', 0x0, 0x0)
r2 = dup2(r0, r1)
writev(r1, &(0x7f0000000340)=[{&(0x7f0000000000), 0x2cfea}], 0x1000000000000013)
r3 = socket(0x18, 0x1, 0x0)
setsockopt$sock_cred(r3, 0xffff, 0x11, 0x0, 0x0)
write(r2, &(0x7f0000000380)="a44531243b36459628c035868124e3ccfd36d8f8fa641ed0a193d02206091b96677415fdb1b35fc5fda1686288f75af544cb1d1bda8ca92170c2246188ec5a6afae9e93731d89f47d93d61ad3f83b603ab52af59b1e2a8802bcc6cc43e6b73cc84b2765d11e670055d76e0db780e341c2178fcd6ca0f19b752e5ee74cfa41fa8be50d3e3a5cc7a8da55425db05a7321bf9620f3805f5fd4e733b94c6d8d0b2916bd64c66cd68a541a4dd7c733d245e13a5e7a16327cb7d1ec4c52e9192b36e09ef02e8ee9f160f6fa5be8fe3c33f02a18d77392cfcbc803d9e898547df4e8b59c423dece83b2f046152ec930dc44afcf252935b408eb21f9204817958c20eeafb7a592f4b28000f1ef61c1a336b172bc819d90972a32b9075db503a8b65e9aa4d7ce054771fa21765f1f0fb0b805d0f4e9a6b494521e7febf40bd6d7e7d33920cb8216c5d5c37c2eb7b971ee75134bbdb606b72f63cff062d08d3411ae2eea5c3f64151d2200f96b9b6d636cb1f0f799d59984bb61bbfc8a57ed7bbd8a52149ba25fe0268f787986b78a51876a228ece025d07826c7c7ca1356fc10221ecbc7ce7cdad4ef68836ac9644934bfc0ca2d40259170599b30ae38ac334df11c14e84b6e0d015f1a5382b15003c8043530ff404f754527c1f05fca76a5538a1fe111aa2d98a92633e1613dd14c8f348cf6cff8930569f48647e3818e78419c554c069", 0x104d00)
this creates a character device node equivalent to /dev/drum (which is a
virtual device giving access to the OS swap space on disk) and writes to it.
if any of the fuzzer user memory has been paged out, when after the data
in swap on disk is overwritten, when the fuzzer accesses that page again,
the bogus data that the fuzzer wrote to swap will be what is read back in.
I found a mail thread from last year that talks about this:
https://groups.google.com/g/syzkaller-netbsd-bugs/c/1jk2EBjW4PI/m/HsqTQ-E9AgAJ
this thread includes a mention of netbsd having another syscall that is
a variation of mknod, called "compat_50_mknod", which is what is being
used in these runs that crash with memory corruption. the code in
sys/targets/common.go applies the mode checks for "mknod" and "mknodat",
but not for "compat_50_mknod". does this additional syscall name need to
be added to sys/targets/common.go? or is there something else
that maps "compat_50_mknod" to "mknod" before the info is given
to this neutralize code?
-Chuck