[Bug 1792647] Re: libuv1 calls readlink() with buffer size zero for /proc/self (nodejs test-case failure on s390x and LXD)
Launchpad Bug Tracker
1792647 at bugs.launchpad.net
Tue Sep 18 14:20:30 UTC 2018
This bug was fixed in the package libuv1 - 1.22.0-3ubuntu1
---------------
libuv1 (1.22.0-3ubuntu1) cosmic; urgency=medium
* debian/patches/path_max_zero_st_size: fix buffer size of zero
for readlink() (EINVAL) when lstat() reports st_size == 0.
This fixes nodejs test-case parallel/test-fs-realpath-pipe.js
on s390x and in LXD on amd64. (LP: #1792647)
-- Mauricio Faria de Oliveira <mfo at canonical.com> Fri, 14 Sep 2018
19:27:12 -0300
** Changed in: libuv1 (Ubuntu)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1792647
Title:
libuv1 calls readlink() with buffer size zero for /proc/self (nodejs
test-case failure on s390x and LXD)
Status in libuv1 package in Ubuntu:
Fix Released
Bug description:
The Debian patch 'path_max' causes failures when
readlink'ing symlinks that involve /proc/self
(and potentially other symlinks in /proc)
which report st_size == 0.
It uses st_size as a buffer size for readlink(),
which then fails with EINVAL.
This breaks the nodejs test-case test-fs-realpath-pipe.js
on s390x and LXD containers (which symlink /dev/stdin
to /proc/self/fd/0 vs. fd/0 as in amd64 non-container):
$ strace -E LD_LIBRARY_PATH=/usr/local/lib/ -f -e lstat,readlink \
node test/parallel/test-fs-realpath-pipe.js
[pid 17785] lstat("/dev", {st_mode=S_IFDIR|0755, st_size=480, ...}) = 0
[pid 17786] lstat("/dev/stdin", {st_mode=S_IFLNK|0777, st_size=15, ...}) = 0
[pid 17788] lstat("/dev/stdin", {st_mode=S_IFLNK|0777, st_size=15, ...}) = 0
[pid 17788] readlink("/dev/stdin", "/proc/self/fd/0", 15) = 15
[pid 17785] lstat("/proc", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
[pid 17786] lstat("/proc/self", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
[pid 17788] lstat("/proc/self", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
[pid 17788] readlink("/proc/self", 0x7f2a6c000b40, 0) = -1 EINVAL (Invalid argument)
I'll submit a patch shortly.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libuv1/+bug/1792647/+subscriptions
More information about the Ubuntu-sponsors
mailing list