Print this page
uts: Allow for address space randomisation.
Randomise the base addresses of shared objects, non-fixed mappings, the
stack and the heap.  Introduce a service, svc:/system/process-security,
and a tool psecflags(1) to control and observe it


 539             CONV_DS_MSG_INIT(DT_DEPRECATED_SPARC_REGISTER, tags_sdreg_cfnp) };
 540         static const conv_ds_msg_t ds_sdreg_nf = {
 541             CONV_DS_MSG_INIT(DT_DEPRECATED_SPARC_REGISTER, tags_sdreg_nf) };
 542 
 543 
 544         /*
 545          * SUNW: DT_LOOS -> DT_HIOS range. Note holes between DT_SUNW_TLSSORTSZ,
 546          * DT_SUNW_STRPAD, and DT_SUNW_LDMACH. We handle the outliers
 547          * separately below as single values.
 548          */
 549         static const Msg        tags_sunw_auxiliary_cf[] = {
 550                 MSG_DT_SUNW_AUXILIARY_CF,       MSG_DT_SUNW_RTLDINF_CF,
 551                 MSG_DT_SUNW_FILTER_CF,          MSG_DT_SUNW_CAP_CF,
 552                 MSG_DT_SUNW_SYMTAB_CF,          MSG_DT_SUNW_SYMSZ_CF,
 553                 MSG_DT_SUNW_SORTENT_CF,         MSG_DT_SUNW_SYMSORT_CF,
 554                 MSG_DT_SUNW_SYMSORTSZ_CF,       MSG_DT_SUNW_TLSSORT_CF,
 555                 MSG_DT_SUNW_TLSSORTSZ_CF,       MSG_DT_SUNW_CAPINFO_CF,
 556                 MSG_DT_SUNW_STRPAD_CF,          MSG_DT_SUNW_CAPCHAIN_CF,
 557                 MSG_DT_SUNW_LDMACH_CF,          0,
 558                 MSG_DT_SUNW_CAPCHAINENT_CF,     0,
 559                 MSG_DT_SUNW_CAPCHAINSZ_CF


 560         };
 561         static const Msg        tags_sunw_auxiliary_cfnp[] = {
 562                 MSG_DT_SUNW_AUXILIARY_CFNP,     MSG_DT_SUNW_RTLDINF_CFNP,
 563                 MSG_DT_SUNW_FILTER_CFNP,        MSG_DT_SUNW_CAP_CFNP,
 564                 MSG_DT_SUNW_SYMTAB_CFNP,        MSG_DT_SUNW_SYMSZ_CFNP,
 565                 MSG_DT_SUNW_SORTENT_CFNP,       MSG_DT_SUNW_SYMSORT_CFNP,
 566                 MSG_DT_SUNW_SYMSORTSZ_CFNP,     MSG_DT_SUNW_TLSSORT_CFNP,
 567                 MSG_DT_SUNW_TLSSORTSZ_CFNP,     MSG_DT_SUNW_CAPINFO_CFNP,
 568                 MSG_DT_SUNW_STRPAD_CFNP,        MSG_DT_SUNW_CAPCHAIN_CFNP,
 569                 MSG_DT_SUNW_LDMACH_CFNP,        0,
 570                 MSG_DT_SUNW_CAPCHAINENT_CFNP,   0,
 571                 MSG_DT_SUNW_CAPCHAINSZ_CFNP


 572         };
 573         static const Msg        tags_sunw_auxiliary_nf[] = {
 574                 MSG_DT_SUNW_AUXILIARY_NF,       MSG_DT_SUNW_RTLDINF_NF,
 575                 MSG_DT_SUNW_FILTER_NF,          MSG_DT_SUNW_CAP_NF,
 576                 MSG_DT_SUNW_SYMTAB_NF,          MSG_DT_SUNW_SYMSZ_NF,
 577                 MSG_DT_SUNW_SORTENT_NF,         MSG_DT_SUNW_SYMSORT_NF,
 578                 MSG_DT_SUNW_SYMSORTSZ_NF,       MSG_DT_SUNW_TLSSORT_NF,
 579                 MSG_DT_SUNW_TLSSORTSZ_NF,       MSG_DT_SUNW_CAPINFO_NF,
 580                 MSG_DT_SUNW_STRPAD_NF,          MSG_DT_SUNW_CAPCHAIN_NF,
 581                 MSG_DT_SUNW_LDMACH_NF,          0,
 582                 MSG_DT_SUNW_CAPCHAINENT_NF,     0,
 583                 MSG_DT_SUNW_CAPCHAINSZ_NF


 584         };
 585         static const conv_ds_msg_t ds_sunw_auxiliary_cf = {
 586             CONV_DS_MSG_INIT(DT_SUNW_AUXILIARY, tags_sunw_auxiliary_cf) };
 587         static const conv_ds_msg_t ds_sunw_auxiliary_cfnp = {
 588             CONV_DS_MSG_INIT(DT_SUNW_AUXILIARY, tags_sunw_auxiliary_cfnp) };
 589         static const conv_ds_msg_t ds_sunw_auxiliary_nf = {
 590             CONV_DS_MSG_INIT(DT_SUNW_AUXILIARY, tags_sunw_auxiliary_nf) };
 591 
 592         /*
 593          * GNU: (In DT_VALRNGLO section) DT_GNU_PRELINKED - DT_GNU_LIBLISTSZ
 594          */
 595         static const Msg        tags_gnu_prelinked_cf[] = {
 596                 MSG_DT_GNU_PRELINKED_CF,        MSG_DT_GNU_CONFLICTSZ_CF,
 597                 MSG_DT_GNU_LIBLISTSZ_CF
 598         };
 599         static const Msg        tags_gnu_prelinked_cfnp[] = {
 600                 MSG_DT_GNU_PRELINKED_CFNP,      MSG_DT_GNU_CONFLICTSZ_CFNP,
 601                 MSG_DT_GNU_LIBLISTSZ_CFNP
 602         };
 603         static const Msg        tags_gnu_prelinked_nf[] = {




 539             CONV_DS_MSG_INIT(DT_DEPRECATED_SPARC_REGISTER, tags_sdreg_cfnp) };
 540         static const conv_ds_msg_t ds_sdreg_nf = {
 541             CONV_DS_MSG_INIT(DT_DEPRECATED_SPARC_REGISTER, tags_sdreg_nf) };
 542 
 543 
 544         /*
 545          * SUNW: DT_LOOS -> DT_HIOS range. Note holes between DT_SUNW_TLSSORTSZ,
 546          * DT_SUNW_STRPAD, and DT_SUNW_LDMACH. We handle the outliers
 547          * separately below as single values.
 548          */
 549         static const Msg        tags_sunw_auxiliary_cf[] = {
 550                 MSG_DT_SUNW_AUXILIARY_CF,       MSG_DT_SUNW_RTLDINF_CF,
 551                 MSG_DT_SUNW_FILTER_CF,          MSG_DT_SUNW_CAP_CF,
 552                 MSG_DT_SUNW_SYMTAB_CF,          MSG_DT_SUNW_SYMSZ_CF,
 553                 MSG_DT_SUNW_SORTENT_CF,         MSG_DT_SUNW_SYMSORT_CF,
 554                 MSG_DT_SUNW_SYMSORTSZ_CF,       MSG_DT_SUNW_TLSSORT_CF,
 555                 MSG_DT_SUNW_TLSSORTSZ_CF,       MSG_DT_SUNW_CAPINFO_CF,
 556                 MSG_DT_SUNW_STRPAD_CF,          MSG_DT_SUNW_CAPCHAIN_CF,
 557                 MSG_DT_SUNW_LDMACH_CF,          0,
 558                 MSG_DT_SUNW_CAPCHAINENT_CF,     0,
 559                 MSG_DT_SUNW_CAPCHAINSZ_CF,      0,
 560                 0,                              0,
 561                 MSG_DT_SUNW_ASLR_CF
 562         };
 563         static const Msg        tags_sunw_auxiliary_cfnp[] = {
 564                 MSG_DT_SUNW_AUXILIARY_CFNP,     MSG_DT_SUNW_RTLDINF_CFNP,
 565                 MSG_DT_SUNW_FILTER_CFNP,        MSG_DT_SUNW_CAP_CFNP,
 566                 MSG_DT_SUNW_SYMTAB_CFNP,        MSG_DT_SUNW_SYMSZ_CFNP,
 567                 MSG_DT_SUNW_SORTENT_CFNP,       MSG_DT_SUNW_SYMSORT_CFNP,
 568                 MSG_DT_SUNW_SYMSORTSZ_CFNP,     MSG_DT_SUNW_TLSSORT_CFNP,
 569                 MSG_DT_SUNW_TLSSORTSZ_CFNP,     MSG_DT_SUNW_CAPINFO_CFNP,
 570                 MSG_DT_SUNW_STRPAD_CFNP,        MSG_DT_SUNW_CAPCHAIN_CFNP,
 571                 MSG_DT_SUNW_LDMACH_CFNP,        0,
 572                 MSG_DT_SUNW_CAPCHAINENT_CFNP,   0,
 573                 MSG_DT_SUNW_CAPCHAINSZ_CFNP,    0,
 574                 0,                              0,
 575                 MSG_DT_SUNW_ASLR_CFNP
 576         };
 577         static const Msg        tags_sunw_auxiliary_nf[] = {
 578                 MSG_DT_SUNW_AUXILIARY_NF,       MSG_DT_SUNW_RTLDINF_NF,
 579                 MSG_DT_SUNW_FILTER_NF,          MSG_DT_SUNW_CAP_NF,
 580                 MSG_DT_SUNW_SYMTAB_NF,          MSG_DT_SUNW_SYMSZ_NF,
 581                 MSG_DT_SUNW_SORTENT_NF,         MSG_DT_SUNW_SYMSORT_NF,
 582                 MSG_DT_SUNW_SYMSORTSZ_NF,       MSG_DT_SUNW_TLSSORT_NF,
 583                 MSG_DT_SUNW_TLSSORTSZ_NF,       MSG_DT_SUNW_CAPINFO_NF,
 584                 MSG_DT_SUNW_STRPAD_NF,          MSG_DT_SUNW_CAPCHAIN_NF,
 585                 MSG_DT_SUNW_LDMACH_NF,          0,
 586                 MSG_DT_SUNW_CAPCHAINENT_NF,     0,
 587                 MSG_DT_SUNW_CAPCHAINSZ_NF,      0,
 588                 0,                              0,
 589                 MSG_DT_SUNW_ASLR_NF
 590         };
 591         static const conv_ds_msg_t ds_sunw_auxiliary_cf = {
 592             CONV_DS_MSG_INIT(DT_SUNW_AUXILIARY, tags_sunw_auxiliary_cf) };
 593         static const conv_ds_msg_t ds_sunw_auxiliary_cfnp = {
 594             CONV_DS_MSG_INIT(DT_SUNW_AUXILIARY, tags_sunw_auxiliary_cfnp) };
 595         static const conv_ds_msg_t ds_sunw_auxiliary_nf = {
 596             CONV_DS_MSG_INIT(DT_SUNW_AUXILIARY, tags_sunw_auxiliary_nf) };
 597 
 598         /*
 599          * GNU: (In DT_VALRNGLO section) DT_GNU_PRELINKED - DT_GNU_LIBLISTSZ
 600          */
 601         static const Msg        tags_gnu_prelinked_cf[] = {
 602                 MSG_DT_GNU_PRELINKED_CF,        MSG_DT_GNU_CONFLICTSZ_CF,
 603                 MSG_DT_GNU_LIBLISTSZ_CF
 604         };
 605         static const Msg        tags_gnu_prelinked_cfnp[] = {
 606                 MSG_DT_GNU_PRELINKED_CFNP,      MSG_DT_GNU_CONFLICTSZ_CFNP,
 607                 MSG_DT_GNU_LIBLISTSZ_CFNP
 608         };
 609         static const Msg        tags_gnu_prelinked_nf[] = {