Skip to content

Commit

Permalink
hs_pow: fix insufficient length check in pow-params
Browse files Browse the repository at this point in the history
The descriptor validation table had an out of date minimum length
for pow-params (3) whereas the spec and the current code expect at
least 4 parameters. This was an opportunity for a malicious service
to cause an assert failure in clients which attempted to parse its
descriptor.

Addresses issue #40793

Signed-off-by: Micah Elizabeth Scott <[email protected]>
  • Loading branch information
Micah Elizabeth Scott committed May 15, 2023
1 parent 34da507 commit 459b775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/feature/hs/hs_descriptor.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static token_rule_t hs_desc_encrypted_v3_token_table[] = {
T01(str_intro_auth_required, R3_INTRO_AUTH_REQUIRED, GE(1), NO_OBJ),
T01(str_single_onion, R3_SINGLE_ONION_SERVICE, ARGS, NO_OBJ),
T01(str_flow_control, R3_FLOW_CONTROL, GE(2), NO_OBJ),
T01(str_pow_params, R3_POW_PARAMS, GE(3), NO_OBJ),
T01(str_pow_params, R3_POW_PARAMS, GE(4), NO_OBJ),
END_OF_TABLE
};

Expand Down

0 comments on commit 459b775

Please sign in to comment.