public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug stdio/30039] __vsprintf_internal does not handle unspecified buffer length in fortify mode Date: Wed, 25 Jan 2023 10:19:51 +0000 [thread overview] Message-ID: <bug-30039-131-aqIVR61Sh9@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-30039-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=30039 Florian Weimer <fweimer at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Flags| |security- Target Milestone|--- |2.37 --- Comment #2 from Florian Weimer <fweimer at redhat dot com> --- Fixed for 2.37 via: commit 0d50f477f47ba637b54fb03ac48d769ec4543e8d Author: Florian Weimer <fweimer@redhat.com> Date: Wed Jan 25 08:01:00 2023 +0100 stdio-common: Handle -1 buffer size in __sprintf_chk & co (bug 30039) This shows up as an assertion failure when sprintf is called with a specifier like "%.8g" and libquadmath is linked in: Fatal glibc error: printf_buffer_as_file.c:31 (__printf_buffer_as_file_commit): assertion failed: file->stream._IO_write_ptr <= file->next->write_end Fix this by detecting pointer wraparound in __vsprintf_internal and saturate the addition to the end of the address space instead. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com> Introduce in the vfprintf refactoring, so need for backporting. -- You are receiving this mail because: You are on the CC list for the bug.
prev parent reply other threads:[~2023-01-25 10:19 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-24 9:44 [Bug stdio/30039] New: __vsprintf_internal does not handle unespecified " fweimer at redhat dot com 2023-01-24 9:45 ` [Bug stdio/30039] " fweimer at redhat dot com 2023-01-24 9:46 ` [Bug stdio/30039] __vsprintf_internal does not handle unspecified " fweimer at redhat dot com 2023-01-24 11:33 ` fweimer at redhat dot com 2023-01-25 10:19 ` fweimer at redhat dot com [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-30039-131-aqIVR61Sh9@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).