From: Alif Zakuan Yuslaimi <[email protected]>

The DesignWare I3C master indexes master->i3cdev[] for transfers and
listing without checking for an out-of-range or empty slot. A bad
device number or a detached DAT entry can therefore NULL-dereference.

This series rejects invalid indices on read/write, clears the i3cdev[]
slot on detach (leaving num_i3cdevs unchanged), and skips NULL slots
when the i3c command lists devices. Also drop unused includes from
cmd/i3c.c.

Alif Zakuan Yuslaimi (2):
  i3c: dw: validate device index and clear slot on detach
  cmd: i3c: drop unused includes and skip empty device slots

 cmd/i3c.c                          | 18 +++++++-----------
 drivers/i3c/master/dw-i3c-master.c | 15 +++++++++++++--
 2 files changed, 20 insertions(+), 13 deletions(-)

-- 
2.43.7

Reply via email to