Skip to content

harden openssl verify, exec path and add regression tests#23

Open
pavankumar464 wants to merge 2 commits into
developfrom
RDKB-65595-Critical
Open

harden openssl verify, exec path and add regression tests#23
pavankumar464 wants to merge 2 commits into
developfrom
RDKB-65595-Critical

Conversation

@pavankumar464

Copy link
Copy Markdown
Contributor

No description provided.

@pavankumar464 pavankumar464 requested a review from a team as a code owner June 23, 2026 10:51
Copilot AI review requested due to automatic review settings June 23, 2026 10:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds regression tests around openssl_verify_with_cert() input handling and hardens the exec() binding by avoiding shell invocation and rejecting unsafe commands.

Changes:

  • Add a new GTest suite (openssl_verify_test) covering edge cases for openssl_verify_with_cert() and validating exec() rejection behavior.
  • Replace exec() implementation from popen()/shell execution to fork() + execvp() with basic metacharacter filtering and argv parsing.
  • Fix openssl_verify_with_cert() URI prefix checking to avoid out-of-bounds reads on short strings.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.

File Description
tests/openssl_verify_test.cpp New regression tests for openssl_verify_with_cert() and exec() hardening behavior.
tests/CMakeLists.txt Adds openssl_verify_test target and registers it with CTest/GTest discovery.
source/jst_functions.c Hardens exec() implementation and fixes file:// prefix checking in openssl_verify_with_cert().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/jst_functions.c
Comment thread source/jst_functions.c
Comment thread source/jst_functions.c Outdated
Comment thread source/jst_functions.c Outdated
Comment thread source/jst_functions.c
Comment thread source/jst_functions.c
Comment thread tests/openssl_verify_test.cpp
Comment thread tests/openssl_verify_test.cpp Outdated
Comment thread source/jst_functions.c Outdated
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.

2 participants