Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153322973
D25086.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D25086.diff
View Options
Index: head/libexec/rtld-elf/rtld.h
===================================================================
--- head/libexec/rtld-elf/rtld.h
+++ head/libexec/rtld-elf/rtld.h
@@ -257,6 +257,7 @@
bool z_interpose : 1; /* Interpose all objects but main */
bool z_nodeflib : 1; /* Don't search default library path */
bool z_global : 1; /* Make the object global */
+ bool z_pie : 1; /* Object proclaimed itself PIE executable */
bool static_tls : 1; /* Needs static TLS allocation */
bool static_tls_copied : 1; /* Needs static TLS copying */
bool ref_nodel : 1; /* Refcount increased to prevent dlclose */
Index: head/libexec/rtld-elf/rtld.c
===================================================================
--- head/libexec/rtld-elf/rtld.c
+++ head/libexec/rtld-elf/rtld.c
@@ -1370,6 +1370,8 @@
obj->z_interpose = true;
if (dynp->d_un.d_val & DF_1_NODEFLIB)
obj->z_nodeflib = true;
+ if (dynp->d_un.d_val & DF_1_PIE)
+ obj->z_pie = true;
break;
default:
@@ -2580,6 +2582,10 @@
obj->path = path;
if (!digest_dynamic(obj, 0))
goto errp;
+ if (obj->z_pie) {
+ _rtld_error("Cannot load PIE binary %s as dso", obj->path);
+ goto errp;
+ }
dbg("%s valid_hash_sysv %d valid_hash_gnu %d dynsymcount %d", obj->path,
obj->valid_hash_sysv, obj->valid_hash_gnu, obj->dynsymcount);
if (obj->z_noopen && (flags & (RTLD_LO_DLOPEN | RTLD_LO_TRACE)) ==
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 11:39 AM (2 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31907936
Default Alt Text
D25086.diff (1 KB)
Attached To
Mode
D25086: Do not allow to load ET_DYN object with DF_1_PIE flag set.
Attached
Detach File
Event Timeline
Log In to Comment