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

drakenclimber / libcgroup
56%
main: 56%

Build:
Build:
LAST BUILD BRANCH: change-email
DEFAULT BRANCH: main
Repo Added 19 Nov 2020 06:53PM UTC
Files 39
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

LAST BUILD ON BRANCH test
branch: test
CHANGE BRANCH
x
Reset
  • test
  • 066
  • 3pl
  • add-cgx-man-pages
  • alert-autofix-11
  • allow-space-cgrules
  • cgall2
  • cgcompare
  • cgcompare2
  • cgconfigscript
  • cgcreate
  • cgroup-controller
  • cgroup-controller-v2
  • cgroup-controller-v3
  • cgsos
  • cgsos2
  • cgsos3
  • change-email
  • clang
  • cleanup-subtree
  • codeql
  • consts-rework
  • coverity
  • dependabot
  • dist-subdirs-2.0
  • distro
  • doc
  • extra-logging
  • fix-005
  • fix-cgxset
  • fix-rel2.0
  • fix008
  • fixspaces
  • fixwarning
  • fixwarnings
  • foo
  • ftest-lock
  • get_next_rule_field
  • getprocs
  • getprocs2
  • github
  • github-workflow-ci
  • issues/21
  • issues/38
  • issues/61
  • issues/62
  • issues/66
  • issues/71
  • issues/71v2
  • issues/73
  • issues/advanced-cgget
  • issues/betterlogs
  • issues/cgclear
  • issues/cgclear2
  • issues/cgconfig-tests
  • issues/cgconfigparser
  • issues/cgexec-test
  • issues/cgget-refactor
  • issues/cgget-refactor2
  • issues/cgget-tests
  • issues/cgrules
  • issues/cgrules2
  • issues/cgrules3
  • issues/cgrules4
  • issues/cgset-tests
  • issues/cgsnapshot
  • issues/cgsnapshot2
  • issues/cgv2-tests
  • issues/cgxget
  • issues/cgxget3
  • issues/cgxget4
  • issues/cgxget5
  • issues/cgxget5-pybindings
  • issues/cgxget5-pybindings3
  • issues/cgxget5-pybindings4
  • issues/cgxget5-pybindings5
  • issues/cgxget5-pybindings6
  • issues/cgxget5-toolslib
  • issues/codecovrel2.0
  • issues/codeql
  • issues/contributing
  • issues/coveralls_badge
  • issues/daemoncodecov
  • issues/delete-cgclear
  • issues/delete-legacy
  • issues/distcheck
  • issues/doxygen
  • issues/doxygen_badge
  • issues/emptycg
  • issues/emptycgcreate
  • issues/finalize
  • issues/fix-warnings
  • issues/fixcgset
  • issues/fixme
  • issues/fixmerge
  • issues/fixtest004
  • issues/fixwarnings
  • issues/ftests_cgv2
  • issues/github_actions
  • issues/improvecodecov
  • issues/kill-child
  • issues/lgtm
  • issues/lscgroup
  • issues/lssubsys
  • issues/mainbadge
  • issues/mount-pybindings
  • issues/nocontainer
  • issues/noinst
  • issues/random
  • issues/readme
  • issues/rel2-codeql
  • issues/remove-libs
  • issues/removetestsdir
  • issues/threaded
  • issues/update-map
  • issues/v2.0.1
  • issues/validate
  • leaf-node
  • linter
  • list-cgroup-mnts-api
  • main
  • master
  • memory_abstraction
  • merge-tests
  • merge-tests-3.0
  • mount-table-overflow
  • nosystemd-job
  • options
  • pids
  • ps
  • pull/44
  • pull/45
  • pull/46
  • release-2.0
  • release-3.0
  • release-3.2
  • rename-python-set-default
  • rework-testing
  • set-property
  • set-property2
  • set-property3
  • set-property4
  • setup_mode
  • systemd
  • systemd-cexample
  • systemd-cgconfig
  • systemd-cmdline
  • systemd-pythonexample
  • test-reliability
  • test2
  • tests2
  • undefsystemd
  • update-gtest
  • update-rel2-tests
  • wip/abstract_cgget2
  • wip/cgexec-test
  • wip/cgset-tests
  • wip/cgsnapshot
  • wip/cgxget
  • wip/cgxget2
  • wip/cgxget3
  • wip/cgxget4
  • wip/delete-legacy
  • wip/dist-subdirs
  • wip/empty_cgcreate2
  • wip/emptycgs
  • wip/gh_actions
  • wip/refactor_cgget2
  • wip/release-2.0
  • wip/systemd
  • wip/systemd10
  • wip/systemd11
  • wip/systemd12
  • wip/systemd2
  • wip/systemd3
  • wip/systemd4
  • wip/systemd5
  • wip/systemd6
  • wip/systemd7
  • wip/systemd8
  • wip/systemd9
  • wip/test-cgget.new
  • wip/test-cgget.old

19 Mar 2026 07:08PM UTC coverage: 56.078% (-0.03%) from 56.108%
23312294051

push

github

drakenclimber
config: pass NULL when probing systemd default cgroup

ASan reported following global-buffer-overflow:

READ of size 1 at 0x7f50dc6b3e9f thread T0
    #0 0x... in cg_concat_path <src>/src/api.c:1769
    #1 0x... in cg_build_path_locked <src>/src/api.c:1889
    #2 0x... in cg_build_path <src>/src/api.c:1910
    #3 0x.. in systemd_default_cgroup_exists <src>/src/config.c:2258
    #4 0x.. in cgroup_set_default_systemd_cgroup <src>/src/config.c:2306
    #5 0x... in main <src>/src/tools/cgdelete.c:193
    #6 0x... in __libc_start_call_main (/lib64/libc.so.6+0x2a60f)
    #7 0x... in __libc_start_main_alias_2 (/lib64/libc.so.6+0x2a6bf)
    #8 0x... in _start (/usr/local/bin/cgdelete+0x402384)

0x... sits one byte to the left of the empty string literal '.LC3' that
systemd_default_cgroup_exists() handed to cg_build_path(). Passing an
empty suffix made cg_concat_path() evaluate suf[-1] while it decided
whether to append a trailing slash, triggering the ASan
global-buffer-overflow.

Fix by passing NULL, instead of "" (empty string) so cg_build_path()
skips the suffix concatenation entirely. The resulting canonical paths
are unchanged, but cgdelete (and any other caller) now runs without
trampling the adjacent literal.

Fixes: https://github.com/libcgroup/libcgroup/issues/526
Signed-off-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%)

3 existing lines in 1 file now uncovered.

5628 of 10036 relevant lines covered (56.08%)

607.81 hits per line

Relevant lines Covered
Build:
Build:
10036 RELEVANT LINES 5628 COVERED LINES
607.81 HITS PER LINE
Source Files on test
  • Tree
  • List 39
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
23312294051 test config: pass NULL when probing systemd default cgroup ASan reported following global-buffer-overflow: READ of size 1 at 0x7f50dc6b3e9f thread T0 #0 0x... in cg_concat_path <src>/src/api.c:1769 #1 0x... in cg_build_path_locked <src>/src/a... push 19 Mar 2026 07:10PM UTC drakenclimber github
56.08
23311009133 test tools/cgxget: free temporary conversions on failure paths AddressSanitizer reported an 8-byte leak when convert_cgroups() aborted: Direct leak of 8 byte(s) in 1 object(s) allocated from: #0 0x... in __interceptor_malloc #1 co... push 19 Mar 2026 06:40PM UTC drakenclimber github
56.11
23309518013 test api: leave room for NUL in cgroup_get_procs() Commit 4a851a569689 ("api: Fix unsafe call to strncat in cgroup_get_procs() and cgroup_get_threads()") tightened several strncat() callers, but the code building the procs/threads paths still used the... push 19 Mar 2026 06:04PM UTC drakenclimber github
56.2
23308118686 test ftests/999: tidy config writes and stress paths Systemd.write_config_with_pid() now writes the temporary config inside a context manager so the file descriptor is always closed. The 999-stress helper switched to os.path.join(), which automaticall... push 19 Mar 2026 05:32PM UTC drakenclimber github
56.17
23307563353 test ftests/077: drop unused global and fix list sorting flake8 reported: tests/ftests/077-pybindings-cgroup_get_procs.py:52:5: F824 is unused: name is never assigned in scope The test already appends to the module-level list, so we do not reassign... push 19 Mar 2026 05:20PM UTC drakenclimber github
56.24
22957196270 test tests/ftests: speed up is_output_same() line compare loop is_output_same() used to call expected_out.splitlines() on every iteration and index into the freshly built list. Switching to enumerate(zip(out_lines, exp_lines)) lets us split both strin... push 11 Mar 2026 02:20PM UTC drakenclimber github
56.21
22956879275 test src/config: free namespace table on success and failure The per-thread namespace table (cg_namespace_table[]) is populated by config_order_namespace_table() / config_validate_namespaces() under cg_mount_table_lock and then consumed by cg_build_pa... push 11 Mar 2026 02:13PM UTC drakenclimber github
56.21
22781467195 test Testing out a fix from codex • Fix Details - Freed the lexer-owned ID strings whenever cgroup_dictionary_create or cgroup_dictionary_add fail, matching the leak reported in issue #518 where parse errors left duplicated tokens allocated... push 06 Mar 2026 08:52PM UTC drakenclimber github
56.17
22781323480 test Testing out a fix from codex Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> push 06 Mar 2026 08:48PM UTC drakenclimber github
56.21
20820343591 test src/api.c: potential null ptr deref in cg_get_cgroups_from_proc_cgroups In function cg_get_cgroups_from_proc_cgroups there is an allocation of memory by calling malloc(buff_len). Result of this allocation is not checked, and in case of OOM it'll ... push 08 Jan 2026 02:34PM UTC drakenclimber github
56.07
See All Builds (1028)
  • Repo on GitHub
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

© 2026 Coveralls, Inc