feat: add thunderbolt udev rule

This will authorize devices on system boot

Fixes: https://github.com/siderolabs/extensions/issues/530

Signed-off-by: Steven Kreitzer <skre@skre.me>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
Steven Kreitzer 2025-07-23 11:15:31 -05:00 committed by Andrey Smirnov
parent c66e678b2b
commit bbea57328c
No known key found for this signature in database
GPG Key ID: FE042E3D4085A811
4 changed files with 11 additions and 1 deletions

View File

@ -66,3 +66,7 @@ You can also verify everything in dmesg:
SUBSYSTEM=thunderbolt
DEVICE=+thunderbolt:1-1
```
## Security Warning
This extension automatically authorizes all Thunderbolt devices during system boot, which poses potential security risks. Use at your own discretion.

View File

@ -0,0 +1,2 @@
# This will authorize Thunderbolt devices on system boot
ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{authorized}=="0", ATTR{authorized}="1"

View File

@ -5,7 +5,8 @@ metadata:
author: Igor Rzegocki
description: |
This system extension provides Thunderbolt/USB4 drivers kernel modules built against a specific Talos version.
This driver enables Thunderbolt/USB4 devices, including networking.
It enables support for Thunderbolt/USB4 devices, including those used for networking.
WARNING: This extension automatically authorizes all Thunderbolt devices during system boot, which poses potential security risks. Use at your own discretion.
compatibility:
talos:
version: ">= v1.5.0"

View File

@ -18,6 +18,9 @@ steps:
xargs -a /pkg/files/modules.txt -I {} install -D /usr/lib/modules/${KERNELRELEASE}/{} /rootfs/usr/lib/modules/${KERNELRELEASE}/{}
depmod -b /rootfs/usr ${KERNELRELEASE}
- |
mkdir -p /rootfs/usr/lib/udev/rules.d/
cp /pkg/files/99-thunderbolt.rules /rootfs/usr/lib/udev/rules.d/
- test:
- |
# https://www.kernel.org/doc/html/v4.15/admin-guide/module-signing.html#signed-modules-and-stripping