Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssl/ja3: better check for ja3 being enabled - 7.0.x backport - v1 #11830

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/app-layer-ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,8 +1109,7 @@ static inline int TLSDecodeHSHelloExtensionEllipticCurves(SSLState *ssl_state,
if (!(HAS_SPACE(elliptic_curves_len)))
goto invalid_length;

if ((ssl_state->current_flags & SSL_AL_FLAG_STATE_CLIENT_HELLO) &&
SC_ATOMIC_GET(ssl_config.enable_ja3)) {
if ((ssl_state->current_flags & SSL_AL_FLAG_STATE_CLIENT_HELLO) && ja3_elliptic_curves) {
uint16_t ec_processed_len = 0;
/* coverity[tainted_data] */
while (ec_processed_len < elliptic_curves_len)
Expand Down Expand Up @@ -1166,8 +1165,7 @@ static inline int TLSDecodeHSHelloExtensionEllipticCurvePF(SSLState *ssl_state,
if (!(HAS_SPACE(ec_pf_len)))
goto invalid_length;

if ((ssl_state->current_flags & SSL_AL_FLAG_STATE_CLIENT_HELLO) &&
SC_ATOMIC_GET(ssl_config.enable_ja3)) {
if ((ssl_state->current_flags & SSL_AL_FLAG_STATE_CLIENT_HELLO) && ja3_elliptic_curves_pf) {
uint8_t ec_pf_processed_len = 0;
/* coverity[tainted_data] */
while (ec_pf_processed_len < ec_pf_len)
Expand Down
Loading