[OpenWrt-Devel] Bug on procps-ng-skill OpenWrt 19.07.2

Marcelo Pacheco marcelo at m2j.com.br
Mon Apr 20 00:27:54 EDT 2020

In module procps-ng-3.3.15, source skill.c, function check_proc
char buf[128];

This buffer is too small to read /proc/<pid>/stat
The code requires the whole file to be read:
         len = read(fd, buf, sizeof(buf));
        if (len <= 0 || (size_t)len >= sizeof(buf))
                goto closure;

Fix I used is to increase to 256 bytes.
Worked for me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200420/8904be05/attachment.htm>
-------------- next part --------------
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list