How did I fix «Segmentation fault (core dumped)» on `aa-logprof`?

Reading log entries from /var/log/syslog.
Updating AppArmor profiles in /etc/apparmor.d.
Segmentation fault (core dumped)

2024-06-16--01-23-40

Probably, apt update && apt upgrade will solve it: