View Issue Details

IDProjectCategoryView StatusLast Update
0008052GNUnetutil librarypublic2024-03-07 19:26
Reporterfefe Assigned ToChristian Grothoff Due Date
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Fixed in Version0.21.0 
Summary0008052: GNUNET_STRINGS_urlencode: buffer overflow
DescriptionThis is in gnunet/src/lib/util/strings.c:

1862 size_t
1863 GNUNET_STRINGS_urlencode (const char *data,
1864 size_t len,
1865 char **out)

len is ignored. The code tries to traverse the input string until it hits a 0 byte.
However, if the 0 byte is in an invalid utf8-sequence, it can skip over it and read past the input buffer, causing a segmentation fault.
Also note that the utf-8 validation is incomplete. It does not validate any of the bytes except the first in a sequence.
TagsNo tags attached.

Activities

Christian Grothoff

2024-01-09 18:29

manager   ~0020849

Nice catch! I checked, only used in one place in GNU Taler, and *all* callers everywhere passed exactly len==strlen(). But, of course, fixing...

Christian Grothoff

2024-01-09 18:31

manager   ~0020850

Fixed in 57ba1868520f09b41e08cfd79b89477efb9bce7d

schanzen

2024-03-07 19:26

administrator   ~0021795

0.21 released

Issue History

Date ModifiedUsernameFieldChange
2024-01-09 18:10fefeNew Issue
2024-01-09 18:29Christian GrothoffNote Added: 0020849
2024-01-09 18:31Christian GrothoffAssigned To => Christian Grothoff
2024-01-09 18:31Christian GrothoffStatusnew => resolved
2024-01-09 18:31Christian GrothoffResolutionopen => fixed
2024-01-09 18:31Christian GrothoffNote Added: 0020850
2024-01-09 19:10Christian GrothoffProjectTaler => GNUnet
2024-01-09 19:10Christian GrothoffCategoryother => util library
2024-03-07 19:26schanzenFixed in Version => 0.21.0
2024-03-07 19:26schanzenNote Added: 0021795
2024-03-07 19:26schanzenStatusresolved => closed