mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Igor Korotin <igor.korotin@linux.dev>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	rust-for-linux@vger.kernel.org,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Nicolás Antinori" <nico.antinori.7@gmail.com>,
	"Georgios Androutsopoulos" <georgeandrout13@gmail.com>
Subject: [GIT PULL] rust-i2c-next for 7.4
Date: Wed, 21 Oct 2026 17:52:39 +0100	[thread overview]
Message-ID: <179260155969.2966.15552703862037914616@linux.dev> (raw)

Hi Andi,

One fix for this window -- a real use-after-free (KASAN-reported, GitHub
issue linked below), not a cleanup.

Thanks
Igor

The following changes since commit 0f6be986ad0eb6fe7338d963a14eaf0dee87677d:

  i2c: imx-lpi2c: remove dmaengine_desc_free() (2026-10-13 15:55:40 +0200)

are available in the Git repository at:

  https://github.com/ikrtn/linux.git tags/rust-i2c-for-7.4

for you to fetch changes up to e7755b5f29ccbfd1222dd52dc2d6eebf39d02289:

  rust: i2c: remove TryFrom<&Device> implementation for &I2cClient (2026-10-21 17:47:21 +0100)

----------------------------------------------------------------
rust: i2c: remove TryFrom<&Device> implementation for &I2cClient

A single fix for the Rust I2C abstractions, targeting 7.4.

Removes an unsound TryFrom<&Device<Ctx>> conversion whose input and
output reference lifetimes were not tied together, letting safe Rust
upgrade a short-lived &Device borrow into an arbitrarily long-lived
&I2cClient that could outlive the underlying device's removal
(use-after-free, reported with a KASAN reproducer). The conversion
had no users, so it's simply removed rather than lifetime-fixed.

Signed-off-by: Nicolás Antinori <nico.antinori.7@gmail.com>
Signed-off-by: Igor Korotin <igor.korotin@linux.dev>

----------------------------------------------------------------
Nicolás Antinori (1):
      rust: i2c: remove TryFrom<&Device> implementation for &I2cClient

 rust/kernel/i2c.rs | 21 ---------------------
 1 file changed, 21 deletions(-)

                 reply	other threads:[~2026-10-21 16:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=179260155969.2966.15552703862037914616@linux.dev \
    --to=igor.korotin@linux.dev \
    --cc=andi.shyti@kernel.org \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=georgeandrout13@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico.antinori.7@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®