From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6D8273858C53; Fri, 25 Aug 2023 02:36:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D8273858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692930967; bh=RZBgJ0zh9X5Vht1/lWcoigbjIR8leK+/Jxn0BKYchWE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vUY8QJuJCssMicuHkxk6kdRRZNq9OnxiRljYnUN3QRGdWpy3Q89dFEEGrKOi3SAxw W6NdNuiAwPUOyQceIzar020GpZmwYiSnqPEwolfKQQU0OvPDYCiB7Pv4Zf/HVSvqfi a/Pl+fLLPe4wpDeagHlLiiB6ytb+/gI4DWrOyve4= From: "zhanghao383 at huawei dot com" To: glibc-bugs@sourceware.org Subject: [Bug nscd/30795] avoid snprintf using %n to generate coredump when F_S=2 is enabled Date: Fri, 25 Aug 2023 02:36:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: nscd X-Bugzilla-Version: 2.34 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zhanghao383 at huawei dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30795 --- Comment #3 from zhanghao (ES) --- and we find if patch 5b61880ba3a0367f8969e028cb2cfe80d6eda8ab, then check t= he compilation log=EF=BC=9A part: [ 114s] gcc pwdcache.c -c -std=3Dgnu11 -fgnu89-inline -O2 -g -DNDEBUG -Wp,-D_GLIBCXX_ASSERTIONS -m64 -mtune=3Dgeneric -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Wwrite-strings -Wundef -fmerge-all-constants -frounding-math -fstack-protector-strong -fno-common -Wstrict-prototypes -Wold-style-definition -fmath-errno -DHAVE_EPOLL -DHAVE_INOTIFY -DHAVE_NETL= INK=20 -fpie -fcf-protection -fpie -U_FORTIFY_SOURCE -I../include -I/home/abuild/rpmbuild/BUILD/glibc-2.34/build-x86_64-openEuler-linux/nscd= =20 -I/home/abuild/rpmbuild/BUILD/glibc-2.34/build-x86_64-openEuler-linux=20 -I../sysdeps/unix/sysv/linux/x86_64/64 -I../sysdeps/unix/sysv/linux/x86_64= =20 -I../sysdeps/unix/sysv/linux/x86/include -I../sysdeps/unix/sysv/linux/x86=20 -I../sysdeps/x86/nptl -I../sysdeps/unix/sysv/linux/wordsize-64=20 -I../sysdeps/x86_64/nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread=20 -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv=20 -I../sysdeps/unix/x86_64 -I../sysdeps/unix -I../sysdeps/posix=20 -I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch=20 -I../sysdeps/x86_64/fpu -I../sysdeps/x86/fpu -I../sysdeps/x86_64/multiarc= h=20 -I../sysdeps/x86_64 -I../sysdeps/x86/include -I../sysdeps/x86=20 -I../sysdeps/ieee754/float128 -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64=20 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754= =20 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/10.3.1/include -isystem /usr/include -D_LIBC_REENTRANT -include /home/abuild/rpmbuild/BUILD/glibc-2.34/build-x86_64-openEuler-linux/libc-mo= dules.h -DMODULE_NAME=3Dnscd -include ../include/libc-symbols.h -DPIC=20=20=20=20 -DTOP_NAMESPACE=3Dglibc -o /home/abuild/rpmbuild/BUILD/glibc-2.34/build-x86_64-openEuler-linux/nscd/pw= dcache.o -MD -MP -MF /home/abuild/rpmbuild/BUILD/glibc-2.34/build-x86_64-openEuler-linux/nscd/pw= dcache.o.dt -MT /home/abuild/rpmbuild/BUILD/glibc-2.34/build-x86_64-openEuler-linux/nscd/pw= dcache.o We found that -D_FORTIFY_SOURCE=3D2 is missing, won't removing -D_FORTIFY_SOURCE=3D2 for nscd module introduce security issues? --=20 You are receiving this mail because: You are on the CC list for the bug.=