View Issue Details

IDProjectCategoryView StatusLast Update
0006158GNUnetutil librarypublic2020-07-09 09:17
Reporterfefe Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.13.0Fixed in Version0.13.0 
Summary0006158: GNUNET_STRINGS_check_filename uses the wrong stat
DescriptionOne of the checks (specified as an argument to the function) is to check whether the filename refers to a symbolic link. Here is the code:

1186 if (0 != (checks & GNUNET_STRINGS_CHECK_IS_LINK))
1187 if (! S_ISLNK (st.st_mode))
1188 return GNUNET_NO;

This only works if we use lstat(2). If we used stat(2) then symbolic links are followed and the returned struct refers to the file they pointed to, not the link. So S_ISLNK can never be set when we used stat instead of lstat.

1175 if (0 != stat (filename, &st))

This needs to be lstat instead.
TagsNo tags attached.

Activities

Christian Grothoff

2020-04-03 18:48

manager   ~0015510

Agreed, I'm just a bit surprised we even call check_filename from Taler. Anyway, fixed in bc19a7509..bc01117ce. And I did try to warn you that AFAIK nobody every carefully looked at libgnunetutil.

schanzen

2020-07-09 09:17

administrator   ~0016429

0.13.0 released

Issue History

Date Modified Username Field Change
2020-04-03 14:18 fefe New Issue
2020-04-03 18:48 Christian Grothoff Note Added: 0015510
2020-04-03 18:48 Christian Grothoff Assigned To => Christian Grothoff
2020-04-03 18:48 Christian Grothoff Status new => resolved
2020-04-03 18:48 Christian Grothoff Resolution open => fixed
2020-04-03 18:48 Christian Grothoff Fixed in Version => 0.12.2
2020-04-03 18:48 Christian Grothoff Target Version => 0.12.2
2020-04-23 10:45 schanzen Fixed in Version 0.12.2 => 0.13.0
2020-04-23 10:47 schanzen Target Version 0.12.2 => 0.13.0
2020-06-01 00:49 Adminknox Issue cloned: 0006317
2020-06-01 00:52 Adminknox Issue cloned: 0006349
2020-07-09 09:17 schanzen Note Added: 0016429
2020-07-09 09:17 schanzen Status resolved => closed