Project

General

Profile

Actions

Bug #8243

closed
LS LS

hyperscan: coverity warning on stat path check

Bug #8243: hyperscan: coverity warning on stat path check

Added by Lukas Sismis 3 months ago. Updated about 1 month ago.

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

Description

** CID 1680388:       Security best practices violations  (TOCTOU)
/src/util-mpm-hs-cache.c: 377           in SCHSCachePruneEvaluate()

_____________________________________________________________________________________________
*** CID 1680388:         Security best practices violations  (TOCTOU)
/src/util-mpm-hs-cache.c: 377             in SCHSCachePruneEvaluate()
371                 continue;
372     
373             if (PathMerge(path, ARRAY_SIZE(path), mpm_conf->cache_dir_path, name) != 0)
374                 continue;
375     
376             struct stat st;
>>>     CID 1680388:         Security best practices violations  (TOCTOU)
>>>     Calling function "stat" to perform check on "path".
377             if (stat(path, &st) != 0 || !S_ISREG(st.st_mode))
378                 continue;
379     
380             considered++;
381     
382             const bool prune_by_age = HSPruneFileByAge(st.st_mtime, cutoff);

Subtasks 1 (0 open1 closed)

Bug #8244: hyperscan: coverity warning on stat path check (8.0.x backport)ClosedLukas SismisActions

Related issues 1 (0 open1 closed)

Related to Suricata - Feature #7830: hyperscan: support cache invalidation and removalClosedLukas SismisActions

OT Updated by OISF Ticketbot 3 months ago Actions #1

  • Subtask #8244 added

OT Updated by OISF Ticketbot 3 months ago Actions #2

  • Label deleted (Needs backport to 8.0)

LS Updated by Lukas Sismis 3 months ago Actions #3

  • Related to Feature #7830: hyperscan: support cache invalidation and removal added

LS Updated by Lukas Sismis 3 months ago Actions #4

  • Subject changed from hyperscan: replace stat path check with access to hyperscan: address stat path check warning

LS Updated by Lukas Sismis 3 months ago Actions #5

  • Status changed from Assigned to Resolved

PA Updated by Philippe Antoine 2 months ago Actions #6

  • Status changed from Resolved to Closed

LS Updated by Lukas Sismis 2 months ago Actions #7

  • Status changed from Closed to Resolved

SB Updated by Shivani Bhardwaj about 2 months ago Actions #8

  • Subject changed from hyperscan: address stat path check warning to hyperscan: coverity warning on stat path check

LS Updated by Lukas Sismis about 1 month ago Actions #9

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom