<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/thunderbolt, branch v7.1-rc6</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1-rc6</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1-rc6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-05-11T09:32:03+00:00</updated>
<entry>
<title>thunderbolt: property: Cap recursion depth in __tb_property_parse_dir()</title>
<updated>2026-05-11T09:32:03+00:00</updated>
<author>
<name>Michael Bommarito</name>
<email>michael.bommarito@gmail.com</email>
</author>
<published>2026-05-10T23:16:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=928abe19fbf0127003abcb1ea69cabc1c897d0ab'/>
<id>urn:sha1:928abe19fbf0127003abcb1ea69cabc1c897d0ab</id>
<content type='text'>
A DIRECTORY entry's value field is used as the dir_offset for a
recursive call into __tb_property_parse_dir() with no depth counter.
A crafted peer that chains DIRECTORY entries into a back-reference
loop drives the parser until the kernel stack is exhausted and the
guard page fires.  Any untrusted XDomain peer (cable, dock, in-line
inspector, adjacent host) that reaches the PROPERTIES_REQUEST
control-plane exchange can trigger this without authentication.

Thread a depth counter through tb_property_parse() and
__tb_property_parse_dir(), and reject blocks that exceed
TB_PROPERTY_MAX_DEPTH = 8.  That is comfortably larger than any
observed legitimate XDomain layout.

Operators who do not need XDomain host-to-host discovery can disable
the path entirely with thunderbolt.xdomain=0 on the kernel command
line.

Fixes: cdae7c07e3e3 ("thunderbolt: Add support for XDomain properties")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-6
Assisted-by: Codex:gpt-5-4
Signed-off-by: Michael Bommarito &lt;michael.bommarito@gmail.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: property: Reject dir_len &lt; 4 to prevent size_t underflow</title>
<updated>2026-05-11T09:31:55+00:00</updated>
<author>
<name>Michael Bommarito</name>
<email>michael.bommarito@gmail.com</email>
</author>
<published>2026-05-10T23:16:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de21b59c29e31c5108ddc04210631bbfab81b997'/>
<id>urn:sha1:de21b59c29e31c5108ddc04210631bbfab81b997</id>
<content type='text'>
On the non-root path, __tb_property_parse_dir() takes dir_len from
entry-&gt;length (u16 widened to size_t).  Two distinct OOB conditions
follow when entry-&gt;length &lt; 4:

1. The non-root path begins with kmemdup(&amp;block[dir_offset],
   sizeof(*dir-&gt;uuid), ...) which always reads 4 dwords from
   dir_offset.  tb_property_entry_valid() only enforces
   dir_offset + entry-&gt;length &lt;= block_len, so a crafted entry
   with dir_offset close to the end of the property block and
   entry-&gt;length in 0..3 passes that gate but lets the UUID copy
   run off the block (e.g. dir_offset = 497, dir_len = 3 in a
   500-dword block reads block[497..501]).

2. After the kmemdup, content_len = dir_len - 4 underflows size_t
   to ~SIZE_MAX, nentries becomes SIZE_MAX / 4, and the entry
   walk runs OOB on each iteration until an entry fails
   validation or the kernel oopses on an unmapped page.

Reject dir_len &lt; 4 on the non-root path *before* the UUID kmemdup,
which closes both holes.

Also move INIT_LIST_HEAD(&amp;dir-&gt;properties) up to immediately after
the dir allocation so the new error-return path (and the existing
uuid-alloc failure path) calling tb_property_free_dir() sees a
walkable list rather than the zero-initialized NULL next/prev that
list_for_each_entry_safe() would oops on.

Fixes: cdae7c07e3e3 ("thunderbolt: Add support for XDomain properties")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-6
Assisted-by: Codex:gpt-5-4
Signed-off-by: Michael Bommarito &lt;michael.bommarito@gmail.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: property: Reject u32 wrap in tb_property_entry_valid()</title>
<updated>2026-05-11T09:31:48+00:00</updated>
<author>
<name>Michael Bommarito</name>
<email>michael.bommarito@gmail.com</email>
</author>
<published>2026-05-10T23:16:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=01deda0152066c6c955f0619114ea6afa070aaec'/>
<id>urn:sha1:01deda0152066c6c955f0619114ea6afa070aaec</id>
<content type='text'>
entry-&gt;value is u32 and entry-&gt;length is u16; the sum is performed in
u32 and wraps.  A malicious XDomain peer can pick
value = 0xffffff00, length = 0x100 so the sum 0x100000000 wraps to 0
and passes the &gt; block_len check.  tb_property_parse() then passes
entry-&gt;value to parse_dwdata() as a dword offset into the property
block, reading attacker-directed memory far past the allocation.

For TEXT-typed entries with the "deviceid" or "vendorid" keys this
lands in xd-&gt;device_name / xd-&gt;vendor_name and is readable back via
the per-XDomain device_name / vendor_name sysfs attributes; the leak
is NUL-bounded (kstrdup() stops at the first zero byte) and
untargeted (the attacker picks a delta, not an absolute address).
DATA-typed entries are parsed into property-&gt;value.data but not
generically surfaced to userspace.

Use check_add_overflow() so a wrapped sum is rejected.

Fixes: cdae7c07e3e3 ("thunderbolt: Add support for XDomain properties")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-6
Assisted-by: Codex:gpt-5-4
Signed-off-by: Michael Bommarito &lt;michael.bommarito@gmail.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'thunderbolt-for-v7.1-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next</title>
<updated>2026-04-10T11:10:28+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2026-04-10T11:10:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cd1be4b2c6398c915d9685d2cf94d93385c08486'/>
<id>urn:sha1:cd1be4b2c6398c915d9685d2cf94d93385c08486</id>
<content type='text'>
Mika writes:

thunderbolt: Changes for v7.1 merge window

This includes following USB4/Thunderbolt changes for the v7.1 merge
window:

  - Disable CL-states for Titan Ridge based devices with older firmware.
  - MAINTAINER update.
  - Simplify allocation of various structures with kzalloc_flex().

All these have been in linux-next with no reported issues.

* tag 'thunderbolt-for-v7.1-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt:
  thunderbolt: tunnel: Simplify allocation
  thunderbolt: Use kzalloc_flex() for struct tb_path allocation
  thunderbolt: dma_port: kmalloc_array + kzalloc to flex
  MAINTAINERS: Remove bouncing maintainer, Mika takes over DMA test driver
  thunderbolt: Disable CLx on Titan Ridge-based devices with old firmware
  thunderbolt: Read router NVM version before applying quirks
</content>
</entry>
<entry>
<title>thunderbolt: tunnel: Simplify allocation</title>
<updated>2026-04-07T07:00:26+00:00</updated>
<author>
<name>Rosen Penev</name>
<email>rosenp@gmail.com</email>
</author>
<published>2026-04-01T21:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=498c05821bb42f70e9bf6512c3dec4aa821815d0'/>
<id>urn:sha1:498c05821bb42f70e9bf6512c3dec4aa821815d0</id>
<content type='text'>
Use a flexible array member and kzalloc_flex to combine allocations.

Add __counted_by for extra runtime analysis. Move counting variable
assignment after allocation. kzalloc_flex with GCC &gt;= 15 does this
automatically.

Signed-off-by: Rosen Penev &lt;rosenp@gmail.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Use kzalloc_flex() for struct tb_path allocation</title>
<updated>2026-03-23T05:49:43+00:00</updated>
<author>
<name>Rosen Penev</name>
<email>rosenp@gmail.com</email>
</author>
<published>2026-03-18T18:52:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c3e7cc8bc5ca08b2fae3d43c7c86f140daa873ef'/>
<id>urn:sha1:c3e7cc8bc5ca08b2fae3d43c7c86f140daa873ef</id>
<content type='text'>
Simplifies allocation of struct tb_path by using a flexible array
member. Also added __counted_by for extra runtime analysis.

Signed-off-by: Rosen Penev &lt;rosenp@gmail.com&gt;
Reviewed-by: Kees Cook &lt;kees@kernel.org&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: dma_port: kmalloc_array + kzalloc to flex</title>
<updated>2026-03-18T13:31:56+00:00</updated>
<author>
<name>Rosen Penev</name>
<email>rosenp@gmail.com</email>
</author>
<published>2026-03-13T21:41:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=500e54d449f60e9692e2622ad2ba4f1e79590e87'/>
<id>urn:sha1:500e54d449f60e9692e2622ad2ba4f1e79590e87</id>
<content type='text'>
Use a single allocation with a flexible array member. Simplifies
allocation and freeing.

Signed-off-by: Rosen Penev &lt;rosenp@gmail.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Fix property read in nhi_wake_supported()</title>
<updated>2026-03-09T11:36:54+00:00</updated>
<author>
<name>Konrad Dybcio</name>
<email>konrad.dybcio@oss.qualcomm.com</email>
</author>
<published>2026-03-09T09:39:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=73a505dc48144ec72e25874e2b2a72487b02d3bc'/>
<id>urn:sha1:73a505dc48144ec72e25874e2b2a72487b02d3bc</id>
<content type='text'>
device_property_read_foo() returns 0 on success and only then modifies
'val'. Currently, val is left uninitialized if the aforementioned
function returns non-zero, making nhi_wake_supported() return true
almost always (random != 0) if the property is not present in device
firmware.

Invert the check to make it make sense.

Fixes: 3cdb9446a117 ("thunderbolt: Add support for Intel Ice Lake")
Cc: stable@vger.kernel.org
Signed-off-by: Konrad Dybcio &lt;konrad.dybcio@oss.qualcomm.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Disable CLx on Titan Ridge-based devices with old firmware</title>
<updated>2026-03-02T06:51:58+00:00</updated>
<author>
<name>Rene Sapiens</name>
<email>rene.sapiens@linux.intel.com</email>
</author>
<published>2026-02-07T00:25:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=59b03d12b1f6d14d936a3ebec225f8d914dc3b70'/>
<id>urn:sha1:59b03d12b1f6d14d936a3ebec225f8d914dc3b70</id>
<content type='text'>
Thunderbolt 3 devices based on Titan Ridge routers with NVM firmware
version &lt; 0x65 have been observed to become unstable when CL states are
enabled. This can lead to link disconnect events and the device failing
to enumerate.

Enable CLx on Titan Ridge only when the running NVM firmware version
is &gt;= 0x65.

Signed-off-by: Rene Sapiens &lt;rene.sapiens@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Read router NVM version before applying quirks</title>
<updated>2026-03-02T06:51:58+00:00</updated>
<author>
<name>Rene Sapiens</name>
<email>rene.sapiens@linux.intel.com</email>
</author>
<published>2026-02-07T00:25:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4573add760b8dd52a215fd134effb76da10ebcf5'/>
<id>urn:sha1:4573add760b8dd52a215fd134effb76da10ebcf5</id>
<content type='text'>
The router NVM version is currently only available after the NVMem devices
have been registered. This is too late for firmware-dependent quirks that
are evaluated during tb_switch_add() before device registration.

Split router NVM handling into two phases:
  - tb_switch_nvm_init() allocates the NVM object and reads the version
  - tb_switch_nvm_add() registers the NVMem devices using the pre-read NVM

This makes the NVM major/minor version available before tb_check_quirks()
without changing when the NVMem devices are registered.

Signed-off-by: Rene Sapiens &lt;rene.sapiens@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
</feed>
