Re: Using systemd-249's libnss_systemd.so.2 triggers a crash in bash-5.1's malloc.c

2021-11-21 Thread Julien Moutinho
Le ven. 19 nov. 2021 17h17 -0500, Chet Ramey a écrit : > This fix is in the most recent set of patches I released this week > (it's patch 9). Thank you! They've been merged a few days ago in the staging branch of NixOS: https://github.com/NixOS/nixpkgs/pull/146463

Re: Using systemd-249's libnss_systemd.so.2 triggers a crash in bash-5.1's malloc.c

2021-10-12 Thread Julien Moutinho
Le mar. 05 oct. 2021 16h12 -0400, Chet Ramey a écrit : > On 10/5/21 1:50 PM, Dominique Martinet wrote: > > If I change malloc_usable_size to return p->mh_nbytes instead of > > maxbytes, then the crash disappears.[2] > > That's the right fix. Chet, when you'll have time, would you mind publishing

Re: Using systemd-249's libnss_systemd.so.2 triggers a crash in bash-5.1's malloc.c

2021-10-04 Thread Julien Moutinho
On Okt 04 2021, Chet Ramey wrote: > I suspect this is a buffer overflow introduced between systemd-247 and > systemd-249. It's not caught when building bash without the bash malloc > because the default libc malloc probably doesn't do the bounds checking > the bash malloc does, even without malloc

Re: Using systemd-249's libnss_systemd.so.2 triggers a crash in bash-5.1's malloc.c

2021-10-04 Thread Julien Moutinho
Le lun. 04 oct. 2021 14h51 -0400, Chet Ramey a écrit : > It's a problem with valgrind, described in another thread with this > subject. Build bash with -DDISABLE_MALLOC_WRAPPERS to work around it. Thanks Chet, that flag makes those crashes disappear. However the crash after

Re: Using systemd-249's libnss_systemd.so.2 triggers a crash in bash-5.1's malloc.c

2021-10-04 Thread Julien Moutinho
Le lun. 04 oct. 2021 10h34 +0200, Andreas Schwab a écrit : > Here is a patch: Thanks Andreas, that particular crash disappears with this patch. However the crash after _nss_systemd_getpwuid_r() is still happening for me, and valgrind can still find a similar crash after source_builtin(): $ nix -L

Using systemd-249's libnss_systemd.so.2 triggers a crash in bash-5.1's malloc.c

2021-10-03 Thread Julien Moutinho
Bash Version: 5.1 Patch Level: 8 Release Status: release Architecture: x86_64-linux Description: bash-5.1 reaches crashing code paths when launched by systemd-249 or valgrind. I cannot get such crashes when bash is built using: ./configure --without-bash-malloc Repeat-By: Here's a Nix recipe