The Patching Friars' AlmanacA calendar of CVE saints

November 24

badmallocHoly card for badmalloc, generated with AI (Claude, Anthropic) for the Lunario dei Frati Patchatori.CC BY-NC-SA 4.0 sudoers # badmalloc LOG FIT RADIX
🤖 Image and text generated with AI

⬇ Download holy card: ·

⚔ Commemorated today: The Scourge of the Guardians of Peace (2014)☀ Commemorated today: The Miracle of the Log4Shell Report (2021)

Embed on your site

Saint badmalloc, Who Logged Allocations as Root

Patron of memory-allocation logs, suid binaries, and symbolic links planted at just the right moment.

Life

Gergely Kalman described badmalloc, a macOS privilege escalation: by setting certain environment variables, the MallocStackLogging framework was loaded even into suid-root binaries and wrote its logs to a folder of choice. By winning a race with a symbolic link and abusing a file descriptor inherited by child processes, one got a line written into /etc/sudoers.d granting root. Apple fixed it by hardening how the files are opened (CVE-2023-32428).

Prayer

O Saint badmalloc, who logs every allocation wherever you like, let our root binaries not follow the links they find. Amen.

How to celebrate

Celebrated by updating macOS and distrusting debug variables that survive into privileged binaries.

Write the logs as root and write only where you must.

Technical record

Disclosed on
November 24 2024
CVE
CVE-2023-32428
Product
Apple · macOS

This issue was addressed with improved file handling. This issue is fixed in macOS Ventura 13.4, tvOS 16.5, iOS 16.5 and iPadOS 16.5, watchOS 9.5. An app may be able to gain root privileges.

Sources: gergelykalman.com

Commemorated today

Shortcuts: ← → to move, D day, W week, M month, T today.

📅 Add to your calendar

Saints:Google CalendarApple, Outlook and others (.ics)

Observances (feasts, scourges and miracles):Google CalendarApple, Outlook and others (.ics)

In Google Calendar you can also paste the URL in Settings → Add calendar → From URL. The first sync can take a few hours.