Skip to content

xinetd probe: bound paths and strans keys; export oscap_path_join#2349

Draft
Mab879 wants to merge 1 commit intoOpenSCAP:mainfrom
Mab879:cursor/xinetd-probe-bounded-paths-and-strans
Draft

xinetd probe: bound paths and strans keys; export oscap_path_join#2349
Mab879 wants to merge 1 commit intoOpenSCAP:mainfrom
Mab879:cursor/xinetd-probe-bounded-paths-and-strans

Conversation

@Mab879
Copy link
Copy Markdown
Member

@Mab879 Mab879 commented May 4, 2026

Use snprintf and length checks for stack buffers; build includedir paths with oscap_path_join. Mark oscap_path_join OSCAP_API for embedded tests. Add regression test for oversized name+protocol key.

Fixes various code issues in this file.

@Mab879 Mab879 added this to the 1.4.5 milestone May 4, 2026
Comment thread src/OVAL/probes/unix/xinetd_probe.c Fixed
@Mab879 Mab879 marked this pull request as draft May 4, 2026 20:02
@Mab879 Mab879 marked this pull request as draft May 4, 2026 20:02
Comment thread src/common/util.h Outdated
* path by exactly 1 slash separator.
*/
char *oscap_path_join(const char *path1, const char *path2);
OSCAP_API char *oscap_path_join(const char *path1, const char *path2);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function prototypes marked with OSCAP_API need to be put in a public header file. Please move it for example to src/common/public/oscap.h.

@Mab879 Mab879 force-pushed the cursor/xinetd-probe-bounded-paths-and-strans branch 4 times, most recently from 474e82d to 3a6fadc Compare May 8, 2026 14:25
Use snprintf and length checks for stack buffers; build includedir paths
with oscap_path_join. Mark oscap_path_join OSCAP_API for embedded tests.
Add regression test for oversized name+protocol key.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Mab879 Mab879 force-pushed the cursor/xinetd-probe-bounded-paths-and-strans branch from 3a6fadc to 9d2f7f0 Compare May 8, 2026 14:34
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@Mab879 Mab879 marked this pull request as ready for review May 8, 2026 14:52
@Mab879 Mab879 marked this pull request as draft May 8, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants