From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 146DC3894E5F; Thu, 30 Apr 2020 19:03:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 146DC3894E5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588273385; bh=cS+8sxG2ZzVt9cTuuvit1HM3l3vw0lxFlwqpFV39vKE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kreh04UP3PGjHhYuUGduaGDySnV7Y0MVbNiY/LbtVWTvnRotD7IPM0xMnhbdALl+E UY56HeS4rGAEz1JZtHjuazUhOgH8fDLszqw88hGcIYDFiKdtw68astXbHZi+XFTwVt aDlbdBnbHsIzaehp3Z9YnhzhhsRmudQqiLFlfPY8= From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/94849] Improper parameter validation in libsanitizer for fopen64 Date: Thu, 30 Apr 2020 19:03:05 +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: msebor 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: cc 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: Thu, 30 Apr 2020 19:03:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94849 Martin Sebor changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org --- Comment #8 from Martin Sebor --- (In reply to Martin Li=C5=A1ka from comment #3) > One possible improvement can be decoration of the filename > with non-null argument (in Glibc). Agreed (unless Glibc wants to support nulls here, in which case it should document it as an extension). Another improvement is to declare fopen and other functions that expect string arguments with attribute access read_only (so for fopen both the file and mode arguments). That would let GCC diagno= se calls that pass in valid pointers that don't point to strings (e.g., just past-the-end pointers). This would be a useful follow-up on https://sourceware.org/bugzilla/show_bug.cgi?id=3D25219.=