HomeFreeBSD

rtld: Fix null-pointer dereference

Description

rtld: Fix null-pointer dereference

When a library is opened via fdlopen, it has a null pointer for its path
and so _rtld_bind can crash as a result of passing the null pointer to
basename() (which passes it to strrchr(), which doesn't do a null check).

PR: 253081
Submitted by: theraven
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28442

Details

Provenance
theravenAuthored on Feb 2 2021, 2:06 PM
kibCommitted on Feb 2 2021, 2:14 PM
Differential Revision
D28442: Fix null-pointer dereference in rtld
Parents
rGd21ce74dcce6: Register the bad read before bailing on terminal errors.
Branches
Unknown
Tags
Unknown