Linux USB
 help / color / mirror / Atom feed
* [PATCH v3 0/2] thunderbolt: validate DROM entry extents
@ 2026-08-13 15:22 Pengpeng Hou
  2026-08-13 15:23 ` [PATCH v3 1/2] thunderbolt: require complete DROM entry headers Pengpeng Hou
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Pengpeng Hou @ 2026-08-13 15:22 UTC (permalink / raw)
  To: Mika Westerberg
  Cc: Andreas Noever, Yehezkel Bernat, Greg Kroah-Hartman,
	Rajmohan Mani, linux-usb, linux-kernel, Pengpeng Hou

The generic DROM walker can read a two-byte entry header from a one-byte
tail and accepts an entry whose declared length is shorter than that
header.  Separately, the USB4 product descriptor parser reads a complete
struct tb_drom_entry_desc without requiring that structure to be present.

Split those contracts into two patches.  The descriptor check now uses
sizeof(*desc), as requested by Mika Westerberg, instead of spelling out
the fields manually.

Changes since v2:
https://lore.kernel.org/all/20260731141700.3-thunderbolt-v2-pengpeng@iscas.ac.cn/
- split the generic entry and USB4 descriptor checks
- validate the USB4 entry with sizeof(*desc)
- rebase and re-review against the current tree

The series was reviewed statically. I did not test it with malformed
device DROM data.

Pengpeng Hou (2):
  thunderbolt: require complete DROM entry headers
  thunderbolt: validate USB4 product descriptor entry size

 drivers/thunderbolt/eeprom.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

base-commit: f5bbbfec59b4e2fb7520a91de3df8a6174325d6a

-- 
2.50.1 (Apple Git-155)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-08-31  9:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13 15:22 [PATCH v3 0/2] thunderbolt: validate DROM entry extents Pengpeng Hou
2026-08-13 15:23 ` [PATCH v3 1/2] thunderbolt: require complete DROM entry headers Pengpeng Hou
2026-08-13 15:25 ` [PATCH v3 2/2] thunderbolt: validate USB4 product descriptor entry size Pengpeng Hou
2026-08-31  6:52 ` [PATCH v3 0/2] thunderbolt: validate DROM entry extents Mika Westerberg
2026-08-31  9:26   ` Mika Westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox