View Issue Details

IDProjectCategoryView StatusLast Update
0006158GNUnetutil librarypublic2020-07-09 07:17
Reporterfefe Assigned ToChristian Grothoff Due Date
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 16: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 07:17

administrator   ~0016429

0.13.0 released

Issue History

Date ModifiedUsernameFieldChange
2020-04-03 12:18fefeNew Issue
2020-04-03 16:48Christian GrothoffNote Added: 0015510
2020-04-03 16:48Christian GrothoffAssigned To => Christian Grothoff
2020-04-03 16:48Christian GrothoffStatusnew => resolved
2020-04-03 16:48Christian GrothoffResolutionopen => fixed
2020-04-03 16:48Christian GrothoffFixed in Version => 0.12.2
2020-04-03 16:48Christian GrothoffTarget Version => 0.12.2
2020-04-23 08:45schanzenFixed in Version0.12.2 => 0.13.0
2020-04-23 08:47schanzenTarget Version0.12.2 => 0.13.0
2020-05-31 22:49AdminknoxIssue cloned: 0006317
2020-05-31 22:52AdminknoxIssue cloned: 0006349
2020-07-09 07:17schanzenNote Added: 0016429
2020-07-09 07:17schanzenStatusresolved => closed