• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

drakenclimber / libcgroup / 16178979042
56%

Build:
DEFAULT BRANCH: main
Ran 09 Jul 2025 08:01PM UTC
Jobs 3
Files 36
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Jun 2025 02:39PM UTC coverage: 54.02% (-2.2%) from 56.219%
16178979042

push

github

drakenclimber
api.c: prevent array out-of-bounds access in cgroup_parse_rules_file

In the function src/api.c/cgroup_parse_rules_file, the condition of loop:

for (i = 0; lst->tail->controllers[i]; i++)
        cgroup_dbg(" %s", lst->tail->controllers[i]);

allows accessing lst->tail->controllers[MAX_MNT_ELEMENTS] if
lst->tail->controllers is full and lacks a terminating NULL.

Add explicit bounds checking (i < MAX_MNT_ELEMENTS) while maintaining
the NULL check. This ensures that there will never be reading past the
array boundaries regardless of its content.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
Acked-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>

1 of 1 new or added line in 1 file covered. (100.0%)

272 existing lines in 14 files now uncovered.

5435 of 10061 relevant lines covered (54.02%)

170.44 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
61.11
-0.96% src/tools/cgdelete.c
3
43.55
-0.66% src/tools/cgclassify.c
3
74.94
-0.75% src/wrapper.c
4
56.84
-0.85% src/tools/cgxset.c
9
0.0
0.0% src/tools/lscgroup.c
12
68.99
-9.3% src/abstraction-common.c
13
50.0
-46.43% src/abstraction-memory.c
15
47.15
-6.06% src/tools/cgexec.c
15
40.59
-1.48% src/tools/cgxget.c
26
34.67
-0.86% src/config.c
26
48.19
-8.03% src/tools/cgcreate.c
38
60.78
-1.13% src/api.c
46
69.53
-8.97% src/tools/cgget.c
61
67.71
-25.5% src/systemd.c
Jobs
ID Job ID Ran Files Coverage
1 Unit Tests - 16178979042.1 09 Jul 2025 08:01PM UTC 36
11.1
GitHub Action Run
2 Sudo Tests - 16178979042.2 09 Jul 2025 08:03PM UTC 36
31.65
GitHub Action Run
3 No Container Tests - 16178979042.3 09 Jul 2025 08:02PM UTC 36
44.34
GitHub Action Run
Source Files on build 16178979042
  • Tree
  • List 36
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ce5749a5 on github
  • Prev Build on main (#15215071854)
  • Next Build on main (#16273229335)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc