]> git.ipfire.org Git - thirdparty/linux.git/commit
thunderbolt: test: Add KUnit tests for property parser bounds checks
authorMichael Bommarito <michael.bommarito@gmail.com>
Mon, 25 May 2026 09:28:30 +0000 (05:28 -0400)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 26 May 2026 13:27:14 +0000 (15:27 +0200)
commitd73a08958e66849ea713d2f458b2fcf7b183f987
tree3f6a10c611fd2feccdb1f2cd2b27f2f0b24ee043
parent15bcac35ba045a9a459144901443210d8b1df7a3
thunderbolt: test: Add KUnit tests for property parser bounds checks

Add regression tests for the zero-length entry and root directory
bounds fixes:

- tb_test_property_parse_zero_length: TEXT entry with length 0
  must be rejected by the validator.

- tb_test_property_parse_rootdir_overflow: root directory whose
  content_offset + content_len exceeds block_len must be rejected.

Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/test.c