Skip to content

Fix: TAINTED.INT_OVERFLOW - #560

Merged
stevegrubb merged 2 commits into
linux-audit:masterfrom
Ti-Mis:FixINTOVERFLOW0810
Oct 10, 2026
Merged

stevegrubb merged 2 commits into
linux-audit:masterfrom
Ti-Mis:FixINTOVERFLOW0810

Conversation

@Ti-Mis

@Ti-Mis Ti-Mis commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Problem:
Potential integer overflow in the block_address_time_parser() function.
Potential integer overflow in the time_string_to_seconds() function.

Solution:
Added range checks before multiplying the parsed time values by the corresponding time units. Negative values are rejected, and the upper bound is checked to prevent integer overflow.

Ti-Mis added 2 commits October 8, 2026 12:43
The time_string_to_seconds() function converts a string to seconds
by multiplying the parsed value by a unit multiplier. Without
checking the value before multiplication, the result may exceed
the range of long and cause signed integer overflow.

Reject negative values and check the upper bound before multiplying
by the unit multiplier. Parenthesize the multipliers in the division
expressions to ensure that the overflow checks use the correct values.

Signed-off-by: Timofey Mishin t.mishin@fobos-nt.ru
Signed-off by: Dina Tagantseva dinchik@altlinux.org
The block_address_time_parser() function uses strtoul() to parse
the configured blocking time. This allows negative input, such as
-1, to be converted to a large unsigned value.

Use strtol() and reject negative values. Check the upper bound before
multiplying by the time unit to prevent integer overflow. Keep the
existing limit of 500 days to reject values outside the supported range.

Signed-off-by: Timofey Mishin t.mishin@fobos-nt.ru
Signed-off by: Dina Tagantseva dinchik@altlinux.org
@stevegrubb

Copy link
Copy Markdown
Contributor

Looks good. Thanks for the contribution.

@stevegrubb
stevegrubb merged commit 280cb8c into linux-audit:master Oct 10, 2026
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