From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 385E4395B055; Wed, 29 Apr 2020 14:28:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 385E4395B055 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588170509; bh=uOdxRue86mZPAlDGsPzGOPrZ060FjQ1uWN3aptukB/I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Inl4SrbRYqs1an3lF3XRdIsKiE0GHg3PMQB8uu4ByVihkEYvOqArmj7Xs1HujPnGu GShIoJRHkNpSL2FlO7AGeg1PMaGi9R7WheuErFLBlFjwqQHWFqZZqJbJUlwk4KBw4C +G35gM+Uxv0jtFzv3M8b1394giK7LtL3OHW1aUVw= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/94849] Improper parameter validation in libsanitizer for fopen64 Date: Wed, 29 Apr 2020 14:28:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to everconfirmed cf_reconfirmed_on Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2020 14:28:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94849 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot g= nu.org Ever confirmed|0 |1 Last reconfirmed| |2020-04-29 --- Comment #1 from Martin Li=C5=A1ka --- (In reply to Rachel Mant from comment #0) > Created attachment 48408 [details] > A simple fix for the bug >=20 > fopen() (actually fopen64 because of macro remapping) as implemented by > Glibc and other C run-times allows the first "path" or "filename" paramet= er > to be nullptr and causes the function to simply do nothing and return > nullptr itself when this happens. >=20 Thank you for the report. Can you please find where is the behavior documen= ted? I can't find anything about NULL pointer argument at: man fopen.=