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

PA Updated by Philippe Antoine 26 days ago Actions #2

  • Tracker changed from Optimization to Bug
  • Subject changed from reputation: remove useless dangerous code to reputation: useless code leads to buffer underflow
  • Status changed from New to In Review
  • Assignee set to Sergey Pinaev
  • Target version changed from TBD to 9.0.0-beta1

PA Updated by Philippe Antoine 26 days ago Actions #3

PA Updated by Philippe Antoine 18 days ago Actions #4

  • Related to Task #8532: suricata-verify: ensure CI covers all tests added

PA Updated by Philippe Antoine 13 days ago Actions #5

  • Status changed from In Review to Resolved

PA Updated by Philippe Antoine 13 days ago Actions #6

  • Label Needs backport to 8.0 added

OT Updated by OISF Ticketbot 13 days ago Actions #7

  • Subtask #8553 added

OT Updated by OISF Ticketbot 13 days ago Actions #8

  • Label deleted (Needs backport to 8.0)

PA Updated by Philippe Antoine 11 days ago Actions #9

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom