diff options
author | Michael J. Ruhl <michael.j.ruhl@intel.com> | 2025-06-27 10:35:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-10 15:59:53 +0200 |
commit | 5b622e672e49e50c33fc64cd06b05ce76e1de460 (patch) | |
tree | aa020be3014851f8cecfbb206bc2eeaebec4cbdc /drivers/usb/core/quirks.c | |
parent | 92530068600baec0982e74778b875891b6a8c9f2 (diff) |
i2c/designware: Fix an initialization issue
commit 3d30048958e0d43425f6d4e76565e6249fa71050 upstream.
The i2c_dw_xfer_init() function requires msgs and msg_write_idx from the
dev context to be initialized.
amd_i2c_dw_xfer_quirk() inits msgs and msgs_num, but not msg_write_idx.
This could allow an out of bounds access (of msgs).
Initialize msg_write_idx before calling i2c_dw_xfer_init().
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: 17631e8ca2d3 ("i2c: designware: Add driver support for AMD NAVI GPU")
Cc: <stable@vger.kernel.org> # v5.13+
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250627143511.489570-1-michael.j.ruhl@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/quirks.c')
0 files changed, 0 insertions, 0 deletions