From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796303483; b=zu2OEf7kwOZWgAHeCdvPIq+nvnR7l0iXoPLNYLiWaAdKVySma1umiepZbq80VhzsW7eq qlgvpAvYbiTqKyPQAgDHjvwKn6NNUd2C5bP4gzdxhDVStKSGBdJtK6U6JbtaGHRJ0Kpug Bzb2ePQpuTYwrHoGPixY+OENCSZwzfYycp0UFyfgD5ERu33KIK2xMZI26f2TvKyZi/8Iv vcdZGhjce8nheOYkzn8lTQc0Y2xOWHbq1IbJudn3GzmEmP/wVSgpnjHHoxAjPVFeGV2ZC UvS1yZd1dphdllU2ALYsuiyg9+isPG8SUHCa/Qy2gJW9FiPe7VlFMgoscn4F7ukkkmQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796303483; h=Received:DKIM-Signature:Received:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=Tyy02rIbLIXdczXCKN+yVU9BMyFm/IiEdDfZOLEnRwE=; b=kw8qvGV0C1GqRR3NbsbBR9bYTMcd2C4NQ8mP6QJGKf3z8kfSK6qwJ2IQNQFqgKAbBwtW Ul46Dj++A91GUxAz+jUZpODRET7n41yv5oxK4GYLuVx1nzO8V6VQCvch4QYH9xndT437n 8LAt0+X8jLlKrZURmp6KDZ6w1lRXj4WR7SR0VcQJBWzhGJOnaCmmL6+b5CbPTXtAOmHpY /7x1bzv8i1LLfBEr2+2hlCREb/5ZLykpkfSKHViAGmQbvz6o3CFU4/VuyoVpgBu0jcFR4 CedtFQm1h7Gq3qSnMGmwCW6A2Nvwgb85OU2r4Q+kLYZUAiMaQyBr6ci38DeQlkcX8Ow== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=agTcIhAm; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 703D1606A32C; Thu, 3 Dec 2026 13:11:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=agTcIhAm Received: by smtp.kernel.org (Postfix) with ESMTPSA id 225ED1F00893; Thu, 3 Dec 2026 13:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796303483; bh=Tyy02rIbLIXdczXCKN+yVU9BMyFm/IiEdDfZOLEnRwE=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=agTcIhAmJbhCjGfdmJWyHEWUpkoWOf47KyKsaFlRM3sFmPfLVR9Qi20SjXR7TCkqa g5JgjV3N/kLwGpCTfhkEWbQg2zVU491nQsqzlcYGr9/rgw3QgbU+e/6XLiaxmC6fBU MHkKPtUIGdZ04yPluhezMBF6+n/g2ydROgDZrdYpQdcBK2bE409nXmoNkYo1d77Ur6 2yiVdsfgau10kW8SE2mJK6TGxYwhcTSPzDqAtRklYs5qlJRKm+mvM6LcDbq+/yRV8q 3p48FLw7zztIGXGngVCAj9MrOD0L6IQ8docJgsT3LhGwBDRfwcj0ubVdV8DB58ufqt bxOhzyxuY1aXg== Received: from johan by xi.lan with local (Exim 4.100.2) (envelope-from ) id 1xZ6am-00000005DA5-3UrG; Thu, 03 Dec 2026 14:11:20 +0100 Date: Thu, 3 Dec 2026 14:11:20 +0100 From: Johan Hovold To: Yannick =?utf-8?Q?M=C3=BCller?= Cc: netdev-bot+sinfo@kernel.org, Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-usb@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net] net: hso: fix use-after-free after failed tty open Message-ID: References: <20261201101336.164922-1-mail@ynnk.dev> <179612033434.3305.13685457274572639061@kernel.org> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: On Tue, Dec 01, 2026 at 12:48:36PM +0000, Yannick M=C3=BCller wrote: > Hey all, The issue was found during a security review with AI support how= ever the finding was manually confirmed. I wrote a working PoC and confirme= d that the bug is trigerable at runtime using a real device. The kernel ver= sion which was beeing used is "7.3.7". Triggering it against the 7.3.7 kern= el using KASAN resulted in the following dmesg trace: [ 62.333336] =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [ 62.333341] BUG: KASAN: slab-us= e-after-free in tty_init_dev.part.0+0x3d3/0x3f0 [ 62.333348] Write of size = 8 at addr ffff88800374d120 by task reclaim_poc/1549 [ 62.333354] CPU: 0 UID= : 0 PID: 1549 Comm: reclaim_poc Not tainted 7.3.7 #1 PREEMPT(lazy) [ 62.333= 358] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-deb= ian-1.16.3-2 04/01/2014 [ 62.333361] Call Trace: [ 62.333362] [ 62.3= 33363] dump_stack_lvl+0x4e/0x70 [ 62.333368] print_report+0x157/0x4c9 [ 62.= 333372] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 62.333376] ? tty_ldisc_g= et.part.0+0xe1/0x2a0 [ 62.333380] ? tty_init_dev.part.0+0x3d3/0x3f0 [ 62.33= 3383] kasan_report+0xce/0x100 [ 62.333387] ? tty_init_dev.part.0+0x3d3/0x3f= 0 [ 62.333390] tty_init_dev.part.0+0x3d3/0x3f0 [ 62.333393] tty_open+0x8f8/= 0x1180 [ 62.333396] ? __pfx_tty_open+0x10/0x10 [ 62.333398] ? __pfx_kobject= _get_unless_zero+0x10/0x10 [ 62.333401] ? __pfx__raw_spin_lock+0x10/0x10 [ = 62.333405] ? selinux_file_open+0x2f4/0x4a0 [ 62.333408] chrdev_open+0x1e5/0= x5b0 [ 62.333411] ? __pfx_chrdev_open+0x10/0x10 [ 62.333414] ? __pfx_lockre= f_get+0x10/0x10 [ 62.333418] ? __pfx_chrdev_open+0x10/0x10 [ 62.333420] do_= dentry_open+0x401/0x1280 [ 62.333424] vfs_open+0x74/0x350 [ 62.333427] path= _openat+0x16b5/0x2020 [ 62.333430] ? __pfx_path_openat+0x10/0x10 [ 62.33343= 3] do_file_open+0x1cd/0x400 [ 62.333436] ? __pfx_do_file_open+0x10/0x10 [ 6= 2.333439] ? alloc_fd+0x32e/0x580 [ 62.333442] do_sys_openat2+0xe2/0x180 [ 6= 2.333445] ? __pfx_do_sys_openat2+0x10/0x10 [ 62.333449] __x64_sys_openat+0x= 103/0x1d0 [ 62.333452] ? __pfx___x64_sys_openat+0x10/0x10 [ 62.333456] do_s= yscall_64+0xdf/0x4b0 [ 62.333459] entry_SYSCALL_64_after_hwframe+0x77/0x7f = [ 62.333462] RIP: 0033:0x7fdd867e93a7 [ 62.333465] Code: 48 89 fa 4c 89 df = e8 78 b3 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 = 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 f= a 08 75 de e8 23 ff ff ff [ 62.333468] RSP: 002b:00007fffca637ab0 EFLAGS: 0= 0000202 ORIG_RAX: 0000000000000101 [ 62.333472] RAX: ffffffffffffffda RBX: = 00007fdd86757780 RCX: 00007fdd867e93a7 [ 62.333474] RDX: 0000000000000902 R= SI: 000056281beeb004 RDI: ffffffffffffff9c [ 62.333476] RBP: 00000000000000= 02 R08: 0000000000000000 R09: 0000000000000000 [ 62.333478] R10: 0000000000= 000000 R11: 0000000000000202 R12: 000056281beeb01c [ 62.333479] R13: 000056= 281beed0c0 R14: 0000000000000040 R15: 000056281beeb004 [ 62.333482] = [ 62.333484] Allocated by task 1473: [ 62.333486] kasan_save_stack+0x30/0x= 50 [ 62.333489] kasan_save_track+0x14/0x30 [ 62.333491] __kasan_kmalloc+0x8= f/0xa0 [ 62.333493] __kmalloc_noprof+0x1ae/0x460 [ 62.333497] load_elf_phdr= s+0xd4/0x190 [ 62.333500] load_elf_binary+0x1dd/0x4700 [ 62.333503] bprm_ex= ecve+0x6c7/0x12c0 [ 62.333506] do_execveat_common.isra.0+0x3c4/0x540 [ 62.3= 33508] __x64_sys_execve+0x8e/0xc0 [ 62.333510] do_syscall_64+0xdf/0x4b0 [ 6= 2.333513] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 62.333516] Freed by ta= sk 1473: [ 62.333517] kasan_save_stack+0x30/0x50 [ 62.333519] kasan_save_tr= ack+0x14/0x30 [ 62.333522] kasan_save_free_info+0x3b/0x70 [ 62.333525] __ka= san_slab_free+0x43/0x70 [ 62.333527] kfree+0x135/0x390 [ 62.333530] load_el= f_binary+0x1834/0x4700 [ 62.333533] bprm_execve+0x6c7/0x12c0 [ 62.333536] d= o_execveat_common.isra.0+0x3c4/0x540 [ 62.333538] __x64_sys_execve+0x8e/0xc= 0 [ 62.333540] do_syscall_64+0xdf/0x4b0 [ 62.333542] entry_SYSCALL_64_after= _hwframe+0x77/0x7f [ 62.333545] The buggy address belongs to the object at = ffff88800374d000 which belongs to the cache kmalloc-1k of size 1024 [ 62.33= 3548] The buggy address is located 288 bytes inside of freed 1024-byte regi= on [ffff88800374d000, ffff88800374d400) [ 62.333551] The buggy address belo= ngs to the physical page: [ 62.333553] page: refcount:0 mapcount:0 mapping:= 0000000000000000 index:0x0 pfn:0x3748 [ 62.333556] head: order:3 mapcount:0= entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 62.333558] flags: 0x10000= 0000000040(head|node=3D0|zone=3D1) [ 62.333561] page_type: f5(slab) [ 62.33= 3565] raw: 0100000000000040 ffff888001041dc0 dead000000000100 dead000000000= 122 [ 62.333567] raw: 0000000000000000 0000000000100010 00000000f5000000 00= 00000000000000 [ 62.333570] head: 0100000000000040 ffff888001041dc0 dead000= 000000100 dead000000000122 [ 62.333572] head: 0000000000000000 000000000010= 0010 00000000f5000000 0000000000000000 [ 62.333574] head: 0100000000000003 = fffffffffffffe01 00000000ffffffff 00000000ffffffff [ 62.333576] head: 00000= 00000000000 0000000000000000 00000000ffffffff 0000000000000000 [ 62.333577]= page dumped because: kasan: bad access detected [ 62.333579] Memory state = around the buggy address: [ 62.333580] ffff88800374d000: fa fb fb fb fb fb = fb fb fb fb fb fb fb fb fb fb [ 62.333582] ffff88800374d080: fb fb fb fb fb= fb fb fb fb fb fb fb fb fb fb fb [ 62.333584] >ffff88800374d100: fb fb fb = fb fb fb fb fb fb fb fb fb fb fb fb fb [ 62.333585] ^ [ 62.333586] ffff8880= 0374d180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 62.333588] ffff= 88800374d200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb I also run th= e same PoC against a patched kernel containing my fix and it resolved the u= se-after-free issue. If you need more information please let me know! Thank= s, Yannick M=C3=BCller On Dec 1, 2026, at 11:18 AM, netdev-bot+sinfo@kernel= =2Eorg wrote: Hi! This is an automated message. This series looks like a fi= x, but its commit messages seem to be missing some information: - How the i= ssue was discovered, e.g. hit in production, hit during development, syzbot= report, manual code inspection, LLM or static analysis tool scan. - Whethe= r the issue was actually triggered, or is only theoretical (e.g. found by L= LM and not proven at runtime). If it was triggered please include the sympt= oms, like the stack trace or kernel messages. Please do not repost the seri= es just to address the above. Instead, reply to this email with the missing= information, so that reviewers can take it into account. *IMPORTANT*: If y= ou do repost (for other reasons) - please include the relevant info in the = cover letter or commit messages. -- The evaluation is done by an LLM so it = may be wrong, if you think that is the case please reply and explain. The mailing lists rejects HTML so this never made it to the list (and is pretty unreadable for the rest of us as you can see above). Johan