Skip to content

Commit

Permalink
ssl/ja3: better check for ja3 being enabled
Browse files Browse the repository at this point in the history
Ticket: 6634

Completes commit 8473525

Avoids error log in Ja3BufferAddValue about NULL buffer
  • Loading branch information
catenacyber authored and victorjulien committed Sep 23, 2024
1 parent 951bcff commit 1d32f11
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app-layer-ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1121,8 +1121,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 @@ -1178,8 +1177,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

0 comments on commit 1d32f11

Please sign in to comment.