mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: CJ <firefly0158@163.com>
To: mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [BUG] media: dw2102: general protection fault in su3000_i2c_transfer
Date: Tue, 15 Sep 2026 15:23:33 +0800 (CST)	[thread overview]
Message-ID: <34c9eb18.63fd.1a0a3f31a7b.Coremail.firefly0158@163.com> (raw)


Hi,


I am reporting a general protection fault in the dw2102 DVB USB driver's I2C
transfer routine, triggered by a syzkaller USB reproducer.  The issue is
reproducible with HEAD commit cee9395acd8043be0644b25c34bfa86623f2b935
(v7.3-rc1, Linux 7.3.0-rc1).


The reproducer connects a synthetic USB device that matches the dw2102 driver,
opens the I2C device node the driver registers, and issues an I2C_RDWR ioctl
with a two-message transfer.


The console shows a general protection fault for the non-canonical address
0xdffffc0000000002 with a KASAN null-ptr-deref in the range [0x10-0x17], and RIP
in su3000_i2c_transfer.  The path is the I2C device ioctl reaching the driver's
transfer callback, with the null dereference happening on the transfer's private
state.


One possible cause is that the driver registers its I2C adapter before the
device state it uses in the transfer callback has been set up, or leaves the
adapter registered after a failed initialization, so an I2C transfer can arrive
while the private structure is still NULL.  This looks like a lifetime or
ordering problem between adapter registration and device setup rather than a
problem with the I2C message itself.  I am reporting the fault and the path as
observed.


This appears to be a recurrence of the syzbot issue whose external id is
d8a78093d7b0bb080e67.  It remains reproducible on v7.3-rc1.


Reproducer:


syz reproducer:
syz_usb_connect(0x3, 0x24, &(0x7f0000000080)=ANY=[@ANYBLOB="21010000db168920402000d92ca9010203010902120001000000000904"], 0x0)
r0 = syz_open_dev$I2C(&(0x7f0000000040), 0x1, 0x2603)
ioctl$I2C_RDWR(r0, 0x707, &(0x7f00000001c0)={&(0x7f0000000000)=[{0x1900, 0x0, 0x0, 0x0}, {0x1, 0x0, 0x0, 0x0}], 0x2})


console output: https://pastebin.com/raw/jZkKz3ji
kernel config: https://pastebin.com/raw/6gefXKVd


Kernel:


HEAD commit: cee9395acd8043be0644b25c34bfa86623f2b935
git tree: upstream (linux.git), tested through the v7.3-rc1 annotated tag object
           e5e04726cdd043e309677071ab1b65a4b18f422b
kernel version: 7.3.0-rc1 #1 PREEMPT(full)
tested tag: v7.3-rc1 (Linux 7.3-rc1, 2026-08-30)


Let me know if you need more details or testing.


Best regards,
Changjian



                 reply	other threads:[~2026-09-15  7:23 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=34c9eb18.63fd.1a0a3f31a7b.Coremail.firefly0158@163.com \
    --to=firefly0158@163.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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®