containers / containers/toolbox
Leaking memory allocated by libsubid
- Dominant language
- Go
- Stars
- 3.5k
- Forks
- 262
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 1
Description
The array of `struct subid_range` allocated by `subid_get_gid_ranges` and `subid_get_uid_ranges` needs to be freed by the libsubid API user. Currently, these are being leaked from inside `validateSubIDRanges()`. This is a fallout from:
https://github.com/containers/toolbox/commit/ca8007c192b3bb77911f5466827252f5b714811b
Shadow 4.16.0 changed the library's soname to `libsubid.so.5.0.0` and introduced `subid_free()` for this. Earlier, the convention was to use `free(3)`. See:
https://github.com/shadow-maint/shadow/commit/0217516349151ae38c68e35cfe0cb6e0e80f9224
https://github.com/shadow-maint/shadow/pull/1019
https://github.com/shadow-maint/shadow/issues/1018
Contributor guide
Assessment
This issue has not been assessed yet.