Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2025-40169

Опубликовано: 12 нояб. 2025
Источник: redhat
CVSS3: 5.5
EPSS Низкий

Описание

In the Linux kernel, the following vulnerability has been resolved: bpf: Reject negative offsets for ALU ops When verifying BPF programs, the check_alu_op() function validates instructions with ALU operations. The 'offset' field in these instructions is a signed 16-bit integer. The existing check 'insn->off > 1' was intended to ensure the offset is either 0, or 1 for BPF_MOD/BPF_DIV. However, because 'insn->off' is signed, this check incorrectly accepts all negative values (e.g., -1). This commit tightens the validation by changing the condition to '(insn->off != 0 && insn->off != 1)'. This ensures that any value other than the explicitly permitted 0 and 1 is rejected, hardening the verifier against malformed BPF programs.

A validation logic error was found in the Linux kernel's BPF verifier when checking ALU operation offsets. A local user with BPF privileges can trigger this issue by loading BPF programs containing ALU instructions with negative offset values. The verifier's check only rejected offsets greater than 1, incorrectly accepting all negative values due to signed comparison semantics. This allows malformed BPF programs to pass verification and potentially cause undefined behavior or crashes, resulting in denial of service.

Отчет

BPF ALU instructions include a signed 16-bit offset field that should only be 0 or 1 (the latter for BPF_MOD/BPF_DIV operations). The check_alu_op verifier function used 'insn->off > 1' to validate this. Because insn->off is a signed s16, this comparison incorrectly accepts negative values—for example, -1 is not > 1 so it passes. The fix changes the condition to explicitly check '(insn->off != 0 && insn->off != 1)', rejecting any value outside the permitted set including all negatives. This hardens the verifier against malformed programs that might exploit unexpected offset values.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 10kernelFix deferred
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelFix deferred
Red Hat Enterprise Linux 9kernel-rtFix deferred

Показывать по

Дополнительная информация

Статус:

Low
Дефект:
CWE-839
https://bugzilla.redhat.com/show_bug.cgi?id=2414474kernel: bpf: Reject negative offsets for ALU ops

EPSS

Процентиль: 4%
0.00144
Низкий

5.5 Medium

CVSS3

Связанные уязвимости

CVSS3: 7.8
ubuntu
9 месяцев назад

In the Linux kernel, the following vulnerability has been resolved: bpf: Reject negative offsets for ALU ops When verifying BPF programs, the check_alu_op() function validates instructions with ALU operations. The 'offset' field in these instructions is a signed 16-bit integer. The existing check 'insn->off > 1' was intended to ensure the offset is either 0, or 1 for BPF_MOD/BPF_DIV. However, because 'insn->off' is signed, this check incorrectly accepts all negative values (e.g., -1). This commit tightens the validation by changing the condition to '(insn->off != 0 && insn->off != 1)'. This ensures that any value other than the explicitly permitted 0 and 1 is rejected, hardening the verifier against malformed BPF programs.

CVSS3: 7.8
nvd
9 месяцев назад

In the Linux kernel, the following vulnerability has been resolved: bpf: Reject negative offsets for ALU ops When verifying BPF programs, the check_alu_op() function validates instructions with ALU operations. The 'offset' field in these instructions is a signed 16-bit integer. The existing check 'insn->off > 1' was intended to ensure the offset is either 0, or 1 for BPF_MOD/BPF_DIV. However, because 'insn->off' is signed, this check incorrectly accepts all negative values (e.g., -1). This commit tightens the validation by changing the condition to '(insn->off != 0 && insn->off != 1)'. This ensures that any value other than the explicitly permitted 0 and 1 is rejected, hardening the verifier against malformed BPF programs.

CVSS3: 7.8
debian
9 месяцев назад

In the Linux kernel, the following vulnerability has been resolved: b ...

CVSS3: 7.8
github
9 месяцев назад

In the Linux kernel, the following vulnerability has been resolved: bpf: Reject negative offsets for ALU ops When verifying BPF programs, the check_alu_op() function validates instructions with ALU operations. The 'offset' field in these instructions is a signed 16-bit integer. The existing check 'insn->off > 1' was intended to ensure the offset is either 0, or 1 for BPF_MOD/BPF_DIV. However, because 'insn->off' is signed, this check incorrectly accepts all negative values (e.g., -1). This commit tightens the validation by changing the condition to '(insn->off != 0 && insn->off != 1)'. This ensures that any value other than the explicitly permitted 0 and 1 is rejected, hardening the verifier against malformed BPF programs.

CVSS3: 5.8
fstec
9 месяцев назад

Уязвимость функции check_alu_op() в файле kernel/bpf/verifier.c ядра операционной системы Linux, позволяющая нарушителю вызвать отказ в обслуживании

EPSS

Процентиль: 4%
0.00144
Низкий

5.5 Medium

CVSS3

Уязвимость CVE-2025-40169