Wind River Support Network

HomeDefectsLIN6-11155
Fixed

LIN6-11155 : memory leak in nscd in WRL6 RCPL29 due to CVE-2015-7547

Created: Apr 26, 2016    Updated: Dec 3, 2018
Resolved Date: Jul 4, 2016
Found In Version: 6.0.0.29
Fix Version: 6.0.0.30
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: Toolchain

Description

A memory leak has been introduced by the fix for CVE-2015-7547 ( LIN6-10840 ). The fix from sourceware requires another two patches to prevent that leak, and they haven't been implemented.
https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html

##############
  - Requires fix for sourceware bug 16574 to avoid memory leak.
    commit d668061994a7486a3ba9c7d5e7882d85a2883707
    commit ab09bf616ad527b249aca5f2a4956fd526f0712f
##############

I have reproduced this issue on a target. As reported, the number of mappings increased and eventually nscd crashed.

I'm attaching the patches ported by our customer and their nscd log.

Steps to Reproduce

configure --enable-board=qemux86 --enable-rootfs=glibc_std --enable-kernel=standard --enable-jobs=4 --enable-parallel-pkgbuilds=4 --with-rcpl-version=0029

make -C build nscd.addpkg
make -C build eglibc-sourcery-binary-utils.addpkg
make all

Our customer provided a test case which exposes the problem, you need the following:
 - nscd running (not sure about it, but it makes it evident)
 - have IPv6 enabled
 - have an IPv6 address on a network interface (local-link is enough)

Run the following command and observe the results:

while true; do nscd -i hosts; getent ahosts google.com > /dev/null || break; wc -l /proc/$(pgrep nscd)/maps; done

You can see that the number of memory mappings inside /proc/<pid>/maps is growing very fast and afterwards nscd crashes.




Other Downloads


Live chat
Online