[PATCH i2c-fixes v1] i2c: core: Fix use-after-free during i2c device removal

Rafael Alejandro Diaz Cruz posted 1 patch 1 month, 1 week ago
drivers/i2c/i2c-core-base.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
[PATCH i2c-fixes v1] i2c: core: Fix use-after-free during i2c device removal
Posted by Rafael Alejandro Diaz Cruz 1 month, 1 week ago
A race condition between a process calling i2c_device_probe()
and removal of a USB device by another process leading to both
processes calling debugfs_remove() opens up the possibility of
UAF.

Fix it by adding atomic xchg() and replacing &client->debugfs
with null before calling debugfs_remove() such that the
following statement: "if (IS_ERR_OR_NULL(dentry)) return;"
inside of debugfs_remove() executes properly.

Fixes: d06905d68610 ("i2c: add core-managed per-client directory in debugfs")
Reported-by: syzbot+227dbc9afd022922d624@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=227dbc9afd022922d624
Signed-off-by: Rafael Alejandro Diaz Cruz <rafad900@gmail.com>
---
 drivers/i2c/i2c-core-base.c | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index fb25704219c7..6fe11232f5ee 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -586,8 +586,14 @@ static int i2c_device_probe(struct device *dev)
 		goto err_clear_wakeup_irq;
 	}
 
-	client->debugfs = debugfs_create_dir(dev_name(&client->dev),
-					     client->adapter->debugfs);
+	struct dentry *parent = READ_ONCE(client->adapter->debugfs);
+
+	if (!parent) {
+		status = -ENODEV;
+		goto err_clear_wakeup_irq;
+	}
+
+	client->debugfs = debugfs_create_dir(dev_name(&client->dev), parent);
 
 	if (driver->probe)
 		status = driver->probe(client);
@@ -608,7 +614,10 @@ static int i2c_device_probe(struct device *dev)
 	return 0;
 
 err_release_driver_resources:
-	debugfs_remove_recursive(client->debugfs);
+	// debugfs_remove_recursive(client->debugfs);
+	struct dentry *dir = xchg(&client->debugfs, NULL);
+
+	debugfs_remove_recursive(dir);
 	devres_release_group(&client->dev, client->devres_group_id);
 err_clear_wakeup_irq:
 	dev_pm_clear_wake_irq(&client->dev);
@@ -632,7 +641,9 @@ static void i2c_device_remove(struct device *dev)
 		driver->remove(client);
 	}
 
-	debugfs_remove_recursive(client->debugfs);
+	struct dentry *dir = xchg(&client->debugfs, NULL);
+
+	debugfs_remove_recursive(dir);
 
 	devres_release_group(&client->dev, client->devres_group_id);
 
@@ -1818,6 +1829,8 @@ void i2c_del_adapter(struct i2c_adapter *adap)
 
 	i2c_acpi_remove_space_handler(adap);
 
+	struct dentry *dir = xchg(&adap->debugfs, NULL);
+
 	i2c_deregister_clients(adap);
 
 	/* device name is gone after device_unregister */
@@ -1827,7 +1840,7 @@ void i2c_del_adapter(struct i2c_adapter *adap)
 
 	i2c_host_notify_irq_teardown(adap);
 
-	debugfs_remove_recursive(adap->debugfs);
+	debugfs_remove_recursive(dir);
 
 	/* wait until all references to the device are gone
 	 *
-- 
2.43.0
Re: [PATCH i2c-fixes v1] i2c: core: Fix use-after-free during i2c device removal
Posted by Hillf Danton 1 month, 1 week ago
#syz test

A race condition between a process calling i2c_device_probe()
and removal of a USB device by another process leading to both
processes calling debugfs_remove() opens up the possibility of
UAF.

Fix it by adding atomic xchg() and replacing &client->debugfs
with null before calling debugfs_remove() such that the
following statement: "if (IS_ERR_OR_NULL(dentry)) return;"
inside of debugfs_remove() executes properly.

Fixes: d06905d68610 ("i2c: add core-managed per-client directory in debugfs")
Reported-by: syzbot+227dbc9afd022922d624@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=227dbc9afd022922d624
Signed-off-by: Rafael Alejandro Diaz Cruz <rafad900@gmail.com>
---
 drivers/i2c/i2c-core-base.c | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index fb25704219c7..6fe11232f5ee 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -586,8 +586,14 @@ static int i2c_device_probe(struct device *dev)
 		goto err_clear_wakeup_irq;
 	}
 
-	client->debugfs = debugfs_create_dir(dev_name(&client->dev),
-					     client->adapter->debugfs);
+	struct dentry *parent = READ_ONCE(client->adapter->debugfs);
+
+	if (!parent) {
+		status = -ENODEV;
+		goto err_clear_wakeup_irq;
+	}
+
+	client->debugfs = debugfs_create_dir(dev_name(&client->dev), parent);
 
 	if (driver->probe)
 		status = driver->probe(client);
@@ -608,7 +614,10 @@ static int i2c_device_probe(struct device *dev)
 	return 0;
 
 err_release_driver_resources:
-	debugfs_remove_recursive(client->debugfs);
+	// debugfs_remove_recursive(client->debugfs);
+	struct dentry *dir = xchg(&client->debugfs, NULL);
+
+	debugfs_remove_recursive(dir);
 	devres_release_group(&client->dev, client->devres_group_id);
 err_clear_wakeup_irq:
 	dev_pm_clear_wake_irq(&client->dev);
@@ -632,7 +641,9 @@ static void i2c_device_remove(struct device *dev)
 		driver->remove(client);
 	}
 
-	debugfs_remove_recursive(client->debugfs);
+	struct dentry *dir = xchg(&client->debugfs, NULL);
+
+	debugfs_remove_recursive(dir);
 
 	devres_release_group(&client->dev, client->devres_group_id);
 
@@ -1818,6 +1829,8 @@ void i2c_del_adapter(struct i2c_adapter *adap)
 
 	i2c_acpi_remove_space_handler(adap);
 
+	struct dentry *dir = xchg(&adap->debugfs, NULL);
+
 	i2c_deregister_clients(adap);
 
 	/* device name is gone after device_unregister */
@@ -1827,7 +1840,7 @@ void i2c_del_adapter(struct i2c_adapter *adap)
 
 	i2c_host_notify_irq_teardown(adap);
 
-	debugfs_remove_recursive(adap->debugfs);
+	debugfs_remove_recursive(dir);
 
 	/* wait until all references to the device are gone
 	 *
-- 
2.43.0
Re: [syzbot] [fs?] [usb?] KASAN: slab-use-after-free Read in lockref_get (2)
Posted by syzbot 1 month, 1 week ago
Hello,

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

pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    3.320347][    T1] NET: Registered PF_INET protocol family
[    3.322856][    T1] IP idents hash table entries: 131072 (order: 8, 1048576 bytes, vmalloc)
[    3.336708][    T1] tcp_listen_portaddr_hash hash table entries: 4096 (order: 7, 294912 bytes, vmalloc)
[    3.339060][    T1] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, vmalloc)
[    3.341172][    T1] TCP established hash table entries: 65536 (order: 7, 524288 bytes, vmalloc)
[    3.352671][    T1] TCP bind hash table entries: 65536 (order: 12, 9437184 bytes, vmalloc hugepage)
[    3.359566][    T1] TCP: Hash tables configured (established 65536 bind 65536)
[    3.362810][    T1] MPTCP token hash table entries: 8192 (order: 8, 720896 bytes, vmalloc)
[    3.365711][    T1] UDP hash table entries: 4096 (order: 8, 1048576 bytes, vmalloc)
[    3.368753][    T1] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    3.393847][    T1] RPC: Registered named UNIX socket transport module.
[    3.395099][    T1] RPC: Registered udp transport module.
[    3.395874][    T1] RPC: Registered tcp transport module.
[    3.396658][    T1] RPC: Registered tcp-with-tls transport module.
[    3.397537][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.413324][    T1] NET: Registered PF_XDP protocol family
[    3.414554][    T1] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
[    3.415698][    T1] pci_bus 0000:00: resource 5 [io  0x0d00-0x0fff window]
[    3.416687][    T1] pci_bus 0000:00: resource 6 [io  0xc000-0xffff window]
[    3.417767][    T1] pci_bus 0000:00: resource 7 [io  0xa000-0xbfff window]
[    3.418871][    T1] pci_bus 0000:00: resource 8 [mem 0x000a0000-0x000bffff window]
[    3.419953][    T1] pci_bus 0000:00: resource 9 [mem 0xc0000000-0xfebfefff window]
[    3.422539][    T1] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[    3.423826][    T1] PCI: CLS 0 bytes, default 64
[    3.426230][    T1] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    3.427263][    T1] software IO TLB: mapped [mem 0x00000000b4400000-0x00000000b8400000] (64MB)
[    3.435273][    T1] ACPI: bus type thunderbolt registered
[    3.443694][    T1] RAPL PMU: API unit is 2^-32 Joules, 0 fixed counters, 10737418240 ms ovfl timer
[    3.447762][   T59] kworker/u8:1 (59) used greatest stack depth: 29032 bytes left
[    3.450226][   T58] kworker/u8:1 (58) used greatest stack depth: 27864 bytes left
[    3.469069][    T1] kvm_amd: CPU 1 isn't AMD or Hygon
[    3.469872][    T1] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x285cff649df, max_idle_ns: 440795263193 ns
[    3.471672][    T1] clocksource: Switched to clocksource tsc
[    3.481565][   T66] kworker/u8:3 (66) used greatest stack depth: 25768 bytes left
[    3.500131][    T1] Initialise system trusted keyrings
[    3.502858][    T1] workingset: timestamp_bits=40 (anon: 35) max_order=21 bucket_order=0 (anon: 0)
[    3.512501][    T1] DLM installed
[    3.517800][    T1] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.536175][    T1] NFS: Registering the id_resolver key type
[    3.537128][    T1] Key type id_resolver registered
[    3.538012][    T1] Key type id_legacy registered
[    3.539140][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    3.540371][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    3.547553][    T1] smbdirect: subsystem loading...
[    3.564900][    T1] smbdirect: subsystem loaded
[    3.598084][    T1] Key type cifs.spnego registered
[    3.599281][    T1] Key type cifs.idmap registered
[    3.603336][    T1] ntfs3: Enabled Linux POSIX ACLs support
[    3.604159][    T1] ntfs3: Read-only LZX/Xpress compression included
[    3.605869][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    3.609511][    T1] romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
[    3.610587][    T1] QNX4 filesystem 0.2.3 registered.
[    3.611550][    T1] qnx6: QNX6 filesystem 1.0.0 registered.
[    3.613253][    T1] fuse: init (API version 7.45)
[    3.616782][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    3.619251][    T1] orangefs_init: module version upstream loaded
[    3.621005][    T1] JFS: nTxBlock = 8192, nTxLock = 65536
[    3.633589][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, repair, quota, no debug enabled
[    3.643027][    T1] 9p: Installing v9fs 9p2000 file system support
[    3.645565][    T1] NILFS version 2 loaded
[    3.646261][    T1] befs: version: 0.9.3
[    3.647689][    T1] ocfs2: Registered cluster interface o2cb
[    3.650626][    T1] ocfs2: Registered cluster interface user
[    3.652098][    T1] OCFS2 User DLM kernel interface loaded
[    3.674039][    T1] gfs2: GFS2 installed
[    3.688972][    T1] ceph: loaded (mds proto 32)
[    3.702507][    T1] NET: Registered PF_ALG protocol family
[    3.703631][    T1] async_tx: api initialized (async)
[    3.704425][    T1] Key type asymmetric registered
[    3.705357][    T1] Asymmetric key parser 'x509' registered
[    3.706303][    T1] Asymmetric key parser 'pkcs8' registered
[    3.707095][    T1] Key type pkcs7_test registered
[    3.708694][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 239)
[    3.711217][    T1] io scheduler mq-deadline registered
[    3.712022][    T1] io scheduler kyber registered
[    3.713500][    T1] io scheduler bfq registered
[    3.733250][    T1] input: Power Button as /devices/platform/LNXPWRBN:00/input/input0
[    3.737243][    T1] ACPI: button: Power Button [PWRF]
[    3.740294][    T1] input: Sleep Button as /devices/platform/LNXSLPBN:00/input/input1
[    3.743488][    T1] ACPI: button: Sleep Button [SLPF]
[    3.760851][    T1] ioatdma: Intel(R) QuickData Technology Driver 5.00
[    3.795590][  T122] ACPI: \_SB_.LNKC: Enabled at IRQ 11
[    3.796719][  T122] virtio-pci 0000:00:03.0: virtio_pci: leaving for legacy driver
[    3.828286][  T122] ACPI: \_SB_.LNKD: Enabled at IRQ 10
[    3.829202][  T122] virtio-pci 0000:00:04.0: virtio_pci: leaving for legacy driver
[    3.859623][  T122] ACPI: \_SB_.LNKB: Enabled at IRQ 10
[    3.860539][  T122] virtio-pci 0000:00:06.0: virtio_pci: leaving for legacy driver
[    4.463278][    T1] N_HDLC line discipline registered with maxframe=4096
[    4.467787][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    4.476224][    T1] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    4.493361][    T1] 00:03: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[    4.509251][    T1] 00:04: ttyS2 at I/O 0x3e8 (irq = 6, base_baud = 115200) is a 16550A
[    4.526430][    T1] 00:05: ttyS3 at I/O 0x2e8 (irq = 7, base_baud = 115200) is a 16550A
[    4.559677][    T1] Non-volatile memory driver v1.3
[    4.580110][    T1] usbcore: registered new interface driver xillyusb
[    4.585483][    T1] ACPI: bus type drm_connector registered
[    4.594378][    T1] [drm] Initialized vgem 1.0.0 for vgem on minor 0
[    4.603925][    T1] ------------[ cut here ]------------
[    4.605301][    T1] [PLANE:35:plane-0] pixel format with alpha exposed but blend mode not setup
[    4.605324][    T1] WARNING: drivers/gpu/drm/drm_mode_config.c:872 at drm_mode_config_validate+0xfb4/0x1be0, CPU#1: swapper/0/1
[    4.608698][    T1] Modules linked in:
[    4.609287][    T1] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full) 
[    4.610609][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/05/2026
[    4.612083][    T1] RIP: 0010:drm_mode_config_validate+0xfbb/0x1be0
[    4.613020][    T1] Code: 00 49 8b 57 18 48 89 f8 48 c1 e8 03 0f b6 04 28 84 c0 74 08 3c 03 0f 8e 00 0b 00 00 48 8d 3d bc 2b 81 0b 41 8b b7 c8 00 00 00 <67> 48 0f b9 3a e9 fa fd ff ff 48 8b 5c 24 20 e8 c1 ab 3c fc 48 8d
[    4.616410][    T1] RSP: 0000:ffffc90000067c18 EFLAGS: 00010246
[    4.617338][    T1] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[    4.618540][    T1] RDX: ffff88801dffdb00 RSI: 0000000000000023 RDI: ffffffff914f9390
[    4.619686][    T1] RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000000
[    4.620824][    T1] R10: 0000000000000001 R11: 0000000000000000 R12: ffffed1004f76023
[    4.621960][    T1] R13: ffffed1004f76024 R14: 0000000000000001 R15: ffff888027bb0028
[    4.623049][    T1] FS:  0000000000000000(0000) GS:ffff888123c83000(0000) knlGS:0000000000000000
[    4.624304][    T1] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    4.625982][    T1] CR2: 0000000000000000 CR3: 000000000eb94000 CR4: 00000000003526f0
[    4.627366][    T1] Call Trace:
[    4.628060][    T1]  <TASK>
[    4.628536][    T1]  drm_dev_register+0x56e/0x7b0
[    4.629278][    T1]  vkms_create+0x491/0x5b0
[    4.630003][    T1]  ? __pfx_vkms_init+0x10/0x10
[    4.630947][    T1]  vkms_init+0x98/0xe0
[    4.631562][    T1]  do_one_initcall+0x11c/0x6f0
[    4.632307][    T1]  ? __pfx_do_one_initcall+0x10/0x10
[    4.633099][    T1]  ? kasan_unpoison+0x27/0x60
[    4.633765][    T1]  ? kernel_init_freeable+0x4ca/0x7b0
[    4.634537][    T1]  kernel_init_freeable+0x6ea/0x7b0
[    4.635547][    T1]  ? __pfx_kernel_init+0x10/0x10
[    4.636310][    T1]  kernel_init+0x21/0x1e0
[    4.637019][    T1]  ? __pfx_kernel_init+0x10/0x10
[    4.637931][    T1]  ret_from_fork+0x730/0xd60
[    4.638635][    T1]  ? __pfx_ret_from_fork+0x10/0x10
[    4.639447][    T1]  ? __switch_to+0x800/0x10f0
[    4.640129][    T1]  ? __pfx_kernel_init+0x10/0x10
[    4.640843][    T1]  ret_from_fork_asm+0x1a/0x30
[    4.641540][    T1]  </TASK>
[    4.641984][    T1] Kernel panic - not syncing: kernel: panic_on_warn set ...
[    4.642965][    T1] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full) 
[    4.644186][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/05/2026
[    4.645282][    T1] Call Trace:
[    4.645282][    T1]  <TASK>
[    4.645282][    T1]  dump_stack_lvl+0x100/0x190
[    4.645282][    T1]  vpanic+0x553/0x970
[    4.645282][    T1]  ? __pfx_vpanic+0x10/0x10
[    4.645282][    T1]  panic+0xd1/0xe0
[    4.645282][    T1]  ? __pfx_panic+0x10/0x10
[    4.645282][    T1]  check_panic_on_warn.cold+0x19/0x34
[    4.645282][    T1]  ? drm_mode_config_validate+0xfb4/0x1be0
[    4.645282][    T1]  __warn.cold+0x191/0x318
[    4.645282][    T1]  __report_bug+0x30f/0x440
[    4.645282][    T1]  ? drm_mode_config_validate+0xfb4/0x1be0
[    4.645282][    T1]  ? __pfx___report_bug+0x10/0x10
[    4.645282][    T1]  ? __lock_acquire+0x4c5/0x1ec0
[    4.654883][    T1]  report_bug_entry+0xe2/0x290
[    4.654883][    T1]  ? drm_mode_config_validate+0xfbb/0x1be0
[    4.654883][    T1]  handle_bug+0x1cd/0x2a0
[    4.654883][    T1]  exc_invalid_op+0x17/0x50
[    4.654883][    T1]  asm_exc_invalid_op+0x1a/0x20
[    4.654883][    T1] RIP: 0010:drm_mode_config_validate+0xfbb/0x1be0
[    4.654883][    T1] Code: 00 49 8b 57 18 48 89 f8 48 c1 e8 03 0f b6 04 28 84 c0 74 08 3c 03 0f 8e 00 0b 00 00 48 8d 3d bc 2b 81 0b 41 8b b7 c8 00 00 00 <67> 48 0f b9 3a e9 fa fd ff ff 48 8b 5c 24 20 e8 c1 ab 3c fc 48 8d
[    4.654883][    T1] RSP: 0000:ffffc90000067c18 EFLAGS: 00010246
[    4.654883][    T1] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[    4.654883][    T1] RDX: ffff88801dffdb00 RSI: 0000000000000023 RDI: ffffffff914f9390
[    4.654883][    T1] RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000000
[    4.654883][    T1] R10: 0000000000000001 R11: 0000000000000000 R12: ffffed1004f76023
[    4.654883][    T1] R13: ffffed1004f76024 R14: 0000000000000001 R15: ffff888027bb0028
[    4.654883][    T1]  ? drm_mode_config_validate+0xf76/0x1be0
[    4.654883][    T1]  drm_dev_register+0x56e/0x7b0
[    4.654883][    T1]  vkms_create+0x491/0x5b0
[    4.654883][    T1]  ? __pfx_vkms_init+0x10/0x10
[    4.654883][    T1]  vkms_init+0x98/0xe0
[    4.654883][    T1]  do_one_initcall+0x11c/0x6f0
[    4.654883][    T1]  ? __pfx_do_one_initcall+0x10/0x10
[    4.654883][    T1]  ? kasan_unpoison+0x27/0x60
[    4.654883][    T1]  ? kernel_init_freeable+0x4ca/0x7b0
[    4.654883][    T1]  kernel_init_freeable+0x6ea/0x7b0
[    4.654883][    T1]  ? __pfx_kernel_init+0x10/0x10
[    4.654883][    T1]  kernel_init+0x21/0x1e0
[    4.654883][    T1]  ? __pfx_kernel_init+0x10/0x10
[    4.654883][    T1]  ret_from_fork+0x730/0xd60
[    4.654883][    T1]  ? __pfx_ret_from_fork+0x10/0x10
[    4.654883][    T1]  ? __switch_to+0x800/0x10f0
[    4.654883][    T1]  ? __pfx_kernel_init+0x10/0x10
[    4.654883][    T1]  ret_from_fork_asm+0x1a/0x30
[    4.654883][    T1]  </TASK>
[    4.654883][    T1] Kernel Offset: disabled
[    4.654883][    T1] Rebooting in 86400 seconds..


syzkaller build log:
go env (err=<nil>)
AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE='auto'
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/syzkaller/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/syzkaller/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3894593634=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/syzkaller/jobs-2/linux/gopath/src/github.com/google/syzkaller/go.mod'
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'
GOTELEMETRY='local'
GOTELEMETRYDIR='/syzkaller/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.26.0'
GOWORK=''
PKG_CONFIG='pkg-config'

git status (err=<nil>)
HEAD detached at 05b26a281c0
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:31: run command via tools/syz-env for best compatibility, see:
Makefile:32: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
go list -f '{{.Stale}}' -ldflags="-s -w -X github.com/google/syzkaller/prog.GitRevision=05b26a281c072cc34dcad83a283fd2aeeff18ad1 -X github.com/google/syzkaller/prog.gitRevisionDate=20260724-140511"  ./sys/syz-sysgen | grep -q false || go install -ldflags="-s -w -X github.com/google/syzkaller/prog.GitRevision=05b26a281c072cc34dcad83a283fd2aeeff18ad1 -X github.com/google/syzkaller/prog.gitRevisionDate=20260724-140511"  ./sys/syz-sysgen
make .descriptions
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Makefile:31: run command via tools/syz-env for best compatibility, see:
Makefile:32: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
bin/syz-sysgen
touch .descriptions
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X github.com/google/syzkaller/prog.GitRevision=05b26a281c072cc34dcad83a283fd2aeeff18ad1 -X github.com/google/syzkaller/prog.gitRevisionDate=20260724-140511"  -o ./bin/linux_amd64/syz-execprog github.com/google/syzkaller/tools/syz-execprog
mkdir -p ./bin/linux_amd64
g++ -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 -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -std=c++17 -I. -Iexecutor/_include   -DGOOS_linux=1 -DGOARCH_amd64=1 \
	-DHOSTGOOS_linux=1 -DGIT_REVISION=\"05b26a281c072cc34dcad83a283fd2aeeff18ad1\"
/usr/bin/ld: /tmp/cchHMbJf.o: in function `Connection::Connect(char const*, char const*)':
executor.cc:(.text._ZN10Connection7ConnectEPKcS1_[_ZN10Connection7ConnectEPKcS1_]+0x386): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./tools/check-syzos.sh 2>/dev/null


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


Tested on:

commit:         26260251 Merge tag 'livepatching-for-7.3' of git://git..
git tree:       upstream
kernel config:  https://syzkaller.appspot.com/x/.config?x=49d6006e566a6d95
dashboard link: https://syzkaller.appspot.com/bug?extid=227dbc9afd022922d624
compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
patch:          https://syzkaller.appspot.com/x/patch.diff?x=14789549580000