View Issue Details

IDProjectCategoryView StatusLast Update
0008052GNUnetutil librarypublic2024-03-07 20:26
Reporterfefe Assigned ToChristian Grothoff  
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 19: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 19:31

manager   ~0020850

Fixed in 57ba1868520f09b41e08cfd79b89477efb9bce7d

schanzen

2024-03-07 20:26

administrator   ~0021795

0.21 released

Issue History

Date Modified Username Field Change
2024-01-09 19:10 fefe New Issue
2024-01-09 19:29 Christian Grothoff Note Added: 0020849
2024-01-09 19:31 Christian Grothoff Assigned To => Christian Grothoff
2024-01-09 19:31 Christian Grothoff Status new => resolved
2024-01-09 19:31 Christian Grothoff Resolution open => fixed
2024-01-09 19:31 Christian Grothoff Note Added: 0020850
2024-01-09 20:10 Christian Grothoff Project Taler => GNUnet
2024-01-09 20:10 Christian Grothoff Category other => util library
2024-03-07 20:26 schanzen Fixed in Version => 0.21.0
2024-03-07 20:26 schanzen Note Added: 0021795
2024-03-07 20:26 schanzen Status resolved => closed