HexBrain

curl · Report #661847

Integer overflows in tool_operate.c at line 1541

Informativestatus
lowseverity
4upvotes
1 Jan 2021disclosed

How it was found

Summary:

[add summary of the vulnerability] In tool_operate.c at line 1541, if --retry-delay>18446744073709552, config->retry_delay*1000 > 2^64 results in integer overflows, on 64 bit architectures;

Steps To Reproduce:

[add details for how we can reproduce the issue]

  1. [add step] Tool_operate.c add a "printf" at line 1538 as following: printf("config->retry_delay1000L = %ld\n", config->retry_delay1000L);
  2. [add step] make
  3. [add step] run command:
    ./src/curl --retry-delay 18446744073709552 -v 192.168.222.1:8080/test.html output: config->retry_delay*1000L = 384

Supporting Material/References:

[list any additional material (e.g. screenshots, logs, etc.)]

  • [attachment / reference]

Impact

The flaw exists on 32&64 bit architectures, it results in retry-delay is invalid.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original