about summary refs log tree commit diff
path: root/src/libutil/affinity.hh
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-01-02T02·27+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-01-02T11·53+0100
commitbbd45ac80fa8ab80acd317ed8d5cc8b3448f7387 (patch)
tree802f5a1f05916dcd31bcdd4421a9027f6972071b /src/libutil/affinity.hh
parent411b237ee55012b0f7b790ed509f4f4102a811ae (diff)
libutil: Improve errmsg on readLink size mismatch.
A message like "error: reading symbolic link `...' : Success" really is
quite confusing, so let's not indicate "success" but rather point out
the real issue.

We could also limit the check of this to just check for non-negative
values, but this would introduce a race condition between stat() and
readlink() if the link target changes between those two calls, thus
leading to a buffer overflow vulnerability.

Reported by @Ericson2314 on IRC. Happened due to a possible ntfs-3g bug
where a relative symlink returned the absolute path (st_)size in stat()
while readlink() returned the relative size.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Tested-by: John Ericson <Ericson2314@Yahoo.com>
Diffstat (limited to 'src/libutil/affinity.hh')
0 files changed, 0 insertions, 0 deletions