Skip to content

fix: Use correct offset for unix socket diagnosis#1061

Merged
aboch merged 1 commit intovishvananda:mainfrom
srebhan:fix_socket_unix
Feb 20, 2025
Merged

fix: Use correct offset for unix socket diagnosis#1061
aboch merged 1 commit intovishvananda:mainfrom
srebhan:fix_socket_unix

Conversation

@srebhan
Copy link
Copy Markdown
Contributor

@srebhan srebhan commented Feb 20, 2025

When parsing diagnosis information of Unix sockets the current code uses the wrong offset (sizeofSocket) for determining the start of the attached parameters.

As a result, returned attributes might be scrambled or missing. More severely, the code might panic if no or only a small number of attributes are available as e.g. in influxdata/telegraf#16527

This PR uses the correct sizeofUnixSocket offset to fix the issue.

Signed-off-by: Sven Rebhan <srebhan@influxdata.com>
@aboch
Copy link
Copy Markdown
Collaborator

aboch commented Feb 20, 2025

LGTM

@aboch aboch merged commit 9f534ef into vishvananda:main Feb 20, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants