From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 77B3E385E44A; Mon, 9 Aug 2021 12:14:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77B3E385E44A From: "npv1310 at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug librt/28213] New: NULL pointer dereference due to CVE-2021-33574 fix Date: Mon, 09 Aug 2021 12:14:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: librt X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: npv1310 at gmail 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Mon, 09 Aug 2021 12:14:01 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28213 Bug ID: 28213 Summary: NULL pointer dereference due to CVE-2021-33574 fix Product: glibc Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: librt Assignee: unassigned at sourceware dot org Reporter: npv1310 at gmail dot com Target Milestone: --- Hello. While investigating the upstream fix of the recent CVE-2021-33574, i've fou= nd following problem: Helper thread frees copied attribute on NOTIFY_REMOVED message received from the OS kernel. Unfortunately, it fails to check whether copied attribute actually exists (data.attr !=3D NULL). This worked earlier because free() c= hecks passed pointer before actually attempting to release corresponding memory. = But __pthread_attr_destroy assumes pointer is not NULL. So passing NULL pointer= to __pthread_attr_destroy will result in segmentation fault. This scenario is possible if notification->sigev_notify_attributes =3D=3D NULL (which means = default thread attributes should be used). Affected file: sysdeps/unix/sysv/linux/mq_notify.c Affected function: helper_thread Affected lineno: 137 --=20 You are receiving this mail because: You are on the CC list for the bug.=