Project

General

Profile

Actions

Bug #8500

closed
SP SP

reputation: useless code leads to buffer underflow

Bug #8500: reputation: useless code leads to buffer underflow

Added by Sergey Pinaev about 1 month ago. Updated 11 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

in src/reputation.c there is 2 places where:
while (isspace((unsigned char)line[--len]));
immediately followed by
len = strlen(line);
this while() is useless and dungerous, because it can lead to access memory before the buffer
if line contains all whitespace characters and the first one is not '\n'/'\r'/'\t' or ' ' (i.e. 0x0c)


Subtasks 1 (0 open1 closed)

Bug #8553: reputation: useless code leads to buffer underflow (8.0.x backport)ClosedOISF DevActions

Related issues 2 (2 open0 closed)

Related to Suricata - Optimization #3589: fuzz: target for iprep data filesAssignedPhilippe AntoineActions
Related to Suricata - Task #8532: suricata-verify: ensure CI covers all testsTriagedOISF DevActions
Actions

Also available in: PDF Atom