Skip to content

Add additional validation to device names - #3423

Merged
stgraber merged 3 commits into
lxc:mainfrom
stgraber:hardening
May 29, 2026
Merged

stgraber merged 3 commits into
lxc:mainfrom
stgraber:hardening

Conversation

@stgraber

Copy link
Copy Markdown
Member

No description provided.

stgraber added 2 commits May 28, 2026 17:35
Have all device name sent through validate.IsAPIName to limit the
maximum length and avoid issues with filesystem paths.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Consistently use linux.PathNameEncode across all device paths.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
@bensmrs

bensmrs commented May 28, 2026

Copy link
Copy Markdown
Member

Looks like the tests are using colons in device names

@stgraber

Copy link
Copy Markdown
Member Author

Fixed, that was quite the terrible device name ;)

@bensmrs

bensmrs commented May 28, 2026

Copy link
Copy Markdown
Member

_definitely_a_valid_name :)

@bensmrs

bensmrs commented May 28, 2026

Copy link
Copy Markdown
Member

Nah, remove L56-59, @stgraber

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
@stgraber

Copy link
Copy Markdown
Member Author

Nuked a bunch of them. No idea why a random network test is doing device name validation like that...

@stgraber
stgraber merged commit 096eedc into lxc:main May 29, 2026
202 of 212 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants