From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1CBAF388A401; Tue, 22 Dec 2020 16:05:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CBAF388A401 From: "siddhesh at sourceware dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/27083] Unsafe unbounded alloca in addmntent Date: Tue, 22 Dec 2020 16:05:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: siddhesh at sourceware dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: siddhesh at sourceware dot org X-Bugzilla-Target-Milestone: 2.33 X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: target_milestone resolution bug_status 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 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2020 16:05:29 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27083 Siddhesh Poyarekar changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.33 Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #3 from Siddhesh Poyarekar --- Fixed in master: commit 9798906a426fc458b949271bcc9b8ad1608de867 (HEAD -> master) Author: Siddhesh Poyarekar Date: Tue Dec 22 17:18:12 2020 +0530 addmntent: Remove unbounded alloca usage from getmntent [BZ#27083] The addmntent function replicates elements of struct mnt on stack using alloca, which is unsafe. Put characters directly into the stream, escaping them as they're being written out. Also add a test to check all escaped characters with addmntent and getmntent. --=20 You are receiving this mail because: You are on the CC list for the bug.=