From: Vasileios Almpanis <vasilisalmpanis@gmail.com>
To: syzbot+23ad911c819b923238b7@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: i2c: core: fix debugfs UAF on adapter removal
Date: Wed, 12 Aug 2026 09:27:55 +0200 [thread overview]
Message-ID: <20260812072756.2026495-1-vasilisalmpanis@gmail.com> (raw)
In-Reply-To: <6a6aac38.79190830.3d7c75.0018.GAE@google.com>
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0131b508c0e2489eac6e121135988f6eeb716f19
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 3ec04787a737..17cf3d225268 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -1815,6 +1815,12 @@ void i2c_del_adapter(struct i2c_adapter *adap)
return;
}
+ /*
+ * This drains any in-flight writers, so all
+ * clients will be caught by i2c_deregister_clients().
+ */
+ device_remove_file(&adap->dev, &dev_attr_new_device);
+
i2c_acpi_remove_space_handler(adap);
i2c_deregister_clients(adap);
next prev parent reply other threads:[~2026-08-12 7:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 1:43 [syzbot] [fs?] KASAN: slab-use-after-free Read in lookup_noperm_common syzbot
2026-07-30 7:49 ` Hillf Danton
2026-07-30 9:33 ` syzbot
2026-08-01 0:00 ` syzbot
2026-08-01 8:03 ` Forwarded: [PATCH] i2c: core: fix debugfs UAF on adapter removal syzbot
2026-08-01 10:15 ` syzbot
2026-08-12 7:27 ` Vasileios Almpanis [this message]
2026-08-12 9:08 ` [syzbot] [fs?] KASAN: slab-use-after-free Read in lookup_noperm_common syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260812072756.2026495-1-vasilisalmpanis@gmail.com \
--to=vasilisalmpanis@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+23ad911c819b923238b7@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox