-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add AF_ALG socket creation detection for CVE-2026-31431 kernel privilege escalation #5969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gkazimiarovich
wants to merge
10
commits into
SigmaHQ:master
Choose a base branch
from
gkazimiarovich:CVE-2026-31431-af-alg-socket-creation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
91ec652
Add AF_ALG socket creation detection for CVE-2026-31431 kernel priv e…
gkazimiarovich a65a211
Update rules/linux/auditd/syscall/lnx_auditd_af_alg_socket_creation.yml
nasbench 610e48a
Update rules/linux/auditd/syscall/lnx_auditd_af_alg_socket_creation.yml
nasbench 9d8b5ab
Merge branch 'master' into CVE-2026-31431-af-alg-socket-creation
gkazimiarovich f49b45d
update: add more references
swachchhanda000 6c29b1f
update: minor
swachchhanda000 470b3a7
fix: minor
swachchhanda000 89a51a6
Update rules/linux/auditd/syscall/lnx_auditd_af_alg_socket_creation.yml
gkazimiarovich 3241bdb
Merge branch 'master' into CVE-2026-31431-af-alg-socket-creation
gkazimiarovich 7eea633
Merge branch 'master' into CVE-2026-31431-af-alg-socket-creation
gkazimiarovich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
rules/linux/auditd/syscall/lnx_auditd_af_alg_socket_creation.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| title: Linux AF_ALG Socket Creation - Kernel Crypto API Exploit Indicator | ||
| id: 474b415a-8b3d-4e6a-9f12-0d5c8a7b6e94 | ||
| status: experimental | ||
| description: | | ||
| Detects creation of AF_ALG (Address Family 38) sockets via the socket() syscall. AF_ALG is the Linux kernel crypto API interface. | ||
| It is exploited in CVE-2026-31431 to achieve local privilege escalation via a buffer overflow in the AF_ALG AEAD splice path that corrupts the page cache of SUID binaries. | ||
| AF_ALG socket creation has near-zero legitimate usage in production environments. | ||
| references: | ||
| - https://nvd.nist.gov/vuln/detail/CVE-2026-31431 | ||
| - https://man7.org/linux/man-pages/man2/socket.2.html | ||
| - https://www.kernel.org/doc/html/latest/crypto/userspace-if.html | ||
| - https://xint.io/blog/copy-fail-linux-distributions | ||
| - https://github.com/theori-io/copy-fail-CVE-2026-31431 | ||
| - https://github.com/torvalds/linux/blob/81d6f7807536a0436dfada07e9292e3702d2bed4/include/linux/socket.h#L245 | ||
| author: Gene Kazimiarovich | ||
|
gkazimiarovich marked this conversation as resolved.
|
||
| date: 2026-04-30 | ||
| tags: | ||
| - attack.privilege-escalation | ||
| - attack.t1068 | ||
| - cve.2026-31431 | ||
| logsource: | ||
| product: linux | ||
| service: auditd | ||
| definition: | | ||
| Required auditd configuration: | ||
| auditctl -a always,exit -F arch=b64 -S socket -k af_alg_detect | ||
| detection: | ||
| selection: | ||
| type: 'SYSCALL' | ||
| SYSCALL: 'socket' | ||
| a0: 26 | ||
| filter_main_legitimate: | ||
| exe|endswith: | ||
| - '/cryptsetup' | ||
| - '/kcapi-speed' | ||
| - '/kcapi-enc' | ||
| - '/kcapi-dgst' | ||
| - '/charon' | ||
| - '/charon-systemd' | ||
| condition: selection and not 1 of filter_main_* | ||
| falsepositives: | ||
| - Disk encryption utilities using kernel crypto offload (cryptsetup with --use-kernel-crypto) | ||
| - Libkcapi userspace tools for kernel crypto API benchmarking | ||
| - StrongSwan IKE daemon with kernel-libipsec plugin | ||
| level: high | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.