sxadm - Solaris セキュリティー拡張の構成の管理
sxadm enable [-c property=value[,property=value,...]] extension[,extension,...]
sxadm exec [-i] [-s extension=value,...] command
sxadm delcust [extension,...]
sxadm disable extension[,extension,...]
sxadm get [-p] [-o field[,...]] property[,...] [extension]
sxadm help [subcommand]
sxadm set property=value[,property=value,...] extension
sxadm status [-p] [-o field[,...]] [extension]
sxadm コマンドは、Solaris セキュリティー拡張を構成し、関連する情報を提供します。
sxadm exec サブコマンドを使用すると、特定のコマンドのセキュリティー拡張を有効または無効にできます。これらの拡張は関連付けられたプロセスに適用され、–i オプションを使用することで任意の子プロセスで継承できます。「セキュリティー拡張」を参照してください。
その他すべての sxadm サブコマンドは、システムレベルのセキュリティー拡張に関する情報を構成して提供します。これらの拡張は、大域ゾーンと非大域ゾーンの両方に適用されます。
プロセスのセキュリティー拡張は exec(2) によって決定され、その時点からプロセスに対して有効になります。拡張は、プロセスが終了するか、再度 exec(2) を呼び出すまで、プロセスの有効期間の間持続します。システムレベルの拡張はすべてのプロセスに影響を与えます。プロセスレベルの拡張は、個々のプロセスに影響を与え、子プロセスが特権プロセスでない場合はすべての子プロセスによって継承されます。「セキュリティー拡張」を参照してください。
個々の実行可能ファイルには、ld(1) で構築する際に、セキュリティー拡張の要件をタグ付けできます。このタグ付けにより、システムレベルの拡張にかかわらず、関連付けられたプロセス要件が確実に満たされます。セキュリティー拡張がタグ付けされている実行可能ファイルは、プロセスレベルの拡張でオーバーライドできます。「実行可能ファイルにタグ付けされる拡張」を参照してください。
Some security extensions restrict an application, providing defenses that constrain borderline behavior.その結果、セキュリティー拡張の適用時に、既存の一部のアプリケーションで障害が発生するか、パフォーマンスが低下する可能性があります。通常、防御が新しいほど、アプリケーションで障害が発生する可能性が高くなります。ある種類の保護が徐々に主流になるにつれて、プログラミングの実践が影響を受け、セキュリティー拡張の適用が原因の障害は少なくなります。
Some security extensions may affect performance, by enabling additional checks or reducing the usage of certain caches and buffers.System administrators may need to choose between performance and security depending on the requirements of their environment.
次のセキュリティー拡張が使用可能です。These extensions may reduce the chances of attackers finding known entry points, planting exploitation code in locations that can later be executed, or taking advantage of CPU implementations.
Application Data Integrity は、SPARC M7 プロセッサで導入された機能で、メモリーの範囲を一意の識別子でタグ付けできるようにします。See adi(7).これらの識別子を使用して、一致しない識別子を持つポインタによる無効な読み取りと書き込みを自動的に検出できます。ヒープアロケータはこの機能を使用して、隣接するバッファーオーバーフローを確実に検出し、浮遊ポインタと use-after-free に対して統計的に防御できます。
ADI は強力なテクノロジですが、低レベルアドレス計算を実行するアプリケーションと互換性がない場合があります。特に、ポインタがタグ付けされるため、ポインタ数学に依存するアプリケーションはまずポインタを正規化する必要があります。さらに、バッファー制限を超えたアクセスも、致命的として検出されます。一部のアプリケーションでは、これらのアクセスを意図的な最適化として使用することがわかっており、ADI では障害が発生する可能性があります。アプリケーションがメモリーチェッカー (valgrind など) 下で正常に実行された場合、これらの問題が発生する可能性はほとんどありません。これらの理由で、ADIHEAP の「all」モデルはサポートされておらず、バイナリタグによって ADIHEAP を有効にするアプリケーションのテスト中は特別な注意を払ってください。
ADIHEAP 拡張は特定のメモリーアロケータ、および ADI をサポートする SPARC システムでのみ使用できます。
ADI identifiers can be used to enable the automatic detection of buffer overflows that overwrite the register save area of a stack frame when the save area contains valid contents.
一部のアプリケーションまたはインタプリタ型言語では、意図的に独自のスタックが直接読み取られるか変更されることがあります。この理由で、ADISTACK の「all」モデルはサポートされておらず、バイナリタグによって ADISTACK を有効にするアプリケーションのテスト中は特別な注意を払ってください。
ADISTACK 拡張機能は、ADI をサポートする SPARC システムでのみ使用できます。
ASLR は、スタック、brk ベースのヒープ、メモリーセグメントマッピングなどのプロセスの重要な部分のランダム化をアクティブにします。位置独立実行可能ファイルとして構築されたアプリケーションのメモリーマッピングも、ASLR でランダム化されます。
HW_BTI provides hardware-based mitigation for CVE-2017-5715 (Branch Target Injection, Spectre Variant 2) for SPARC CPUs.When enabled, some applications might experience lower performance.
IBPB is a mitigation for CVE-2017-5715 for Intel CPUs.It is used in the kernel to guarantee that older indirect branches cannot influence predictions of indirect branches in the future.It is enabled by default on systems where it is required and supported.When it is enabled some applications might experience lower performance.
A reboot is required after enabling or disabling IBPB for the changes to take effect.
IBRS is a mitigation for CVE-2017-5715 for Intel CPUs.It is called on every entry into the kernel and restricts the speculation of indirect branches.It is enabled by default on systems where it is required and supported.When it is enabled some applications might experience lower performance.
A reboot is required after enabling or disabling IBRS for the changes to take effect.
IF_PSCHANGE_MC_NO is a readonly extension that is enabled only if the CPU includes a hardware mitigation for the Machine Check Error on Page Size Change (aka IFU) vulnerability (CVE-2018-12207).
KADI は、Application Data Integrity を使用してカーネルヒープ内のメモリー破損を取得します。KADI は、バッファーオーバーフロー、解放済みメモリーの使用、再割り当て済みメモリーの使用、および二重解放に対する保護を提供します。
変更を有効にするには、KADI を有効または無効にしたあとにリブートが必要です。
KADI is a development-only feature to be used as a debugging aid by developers of device drivers and other kernel modules.It may decrease system stability, so is not recommended for use on production systems at this time.A future release may declare KADI suitable for production deployment.
KPTI isolates kernel page tables from user space processes to reduce the opportunity for kernel data leakage.On Intel CPUs this can mitigate CVE-2017-5754 Rogue Data Cache Load (RDCL) and other vulnerabilities.
KPTI is always enabled and can not be disabled on SPARC systems.KPTI is enabled by default on x86 systems.A reboot is required on x86 systems after enabling or disabling KPTI for the changes to take effect.
L1DF is a mitigation for CVE-2018-3646 for Intel CPUs only.It flushes sensitive data from the L1D cache to prevent an untrusted guest virtual machine from inferring data from other guest virtual machines.This flush is performed every time the host system enters a virtual machine (VM entry).As part of this mitigation disabling hyper-threading (HT) while running virtual machines is strongly recommended.
This mitigation is enabled by default on systems where it is required and supported.
A reboot is required after enabling or disabling L1DF for the changes to take effect.
MD_CLEAR is a mitigation for the Microarchitectural Data Sampling (MDS) series of vulnerabilities for Intel CPUs only.The vulnerabilities are CVE-2018-12126 Microarchitectural Store Buffer Data Sampling (MSBDS), CVE-2018-12130 Microarchitectural Fill Buffer Data Sampling (MFBDS), CVE-2018-12127 Microarchitectural Load Port Data Sampling (MLPDS), CVE-2019-11091 Microarchitectural Data Sampling Uncacheable Memory (MDSUM).The mitigation overwrites the store and fill buffers on the logical processors that are affected by MDS.
This mitigation is enabled by default on systems where it is required and supported.
A reboot is required after enabling or disabling MD_CLEAR for the changes to take effect.
MDS_NO is a readonly extension that is only enabled if the CPU is not vulnerable to the Microarchitectural Data Sampling (MDS) series of vulnerabilities that are mitigated in software by the MD_CLEAR extension.
NXHEAP は、プロセスヒープに割り当てられたページが実行可能になることを防ぎます。
NXSTACK は、プロセススタックに割り当てられたページが実行可能になることを防ぎます。旧バージョンの /etc/system, noexec_user_stack および noexec_user_stack_log 設定との下位互換性は維持されていますが、このような制御は非推奨であり、代わりに sxadm を使用するようにしてください。
RDCL_NO is a readonly extension that is only enabled if the CPU is not vulnerable to the Rogue Data Cache Load (RDCL) and Microarchitectural Fill Buffer Data Sampling (MFBDS) vulnerabilities (CVE-2017-5754, CVE-2018-3646 and CVE-2018-12130).
RSBS is a mitigation for CVE-2018-15572.Enabled by default, it restricts speculation based on the Return Stack Buffer state.
RSBS is always enabled on SPARC systems and cannot be disabled.
On x86 systems, RSBS may be enabled or disabled.A reboot is required for the change to take effect.
SMAP is mechanism to disallow supervisor mode execution of text mapped only in userland on Intel CPUs.It is enabled by default when it is supported by the hardware.Certain applications or drivers can fail when SMAP is enabled.
A reboot is required after enabling or disabling SMAP for the changes to take effect.
SSBD is a mitigation for CVE-2018-3639.It restricts loads from speculating around older stores.It is enabled by default on systems where it is required and supported.When enabled, some applications might experience lower performance.
On SPARC, sxadm(8) only displays the current state of SSBD.Enabling or disabling SSBD can be done on Fujitsu SPARC systems that support SSBD via an XSCF command.See XSCF Reference Manual of your system for more information.A host reboot is required to make changes.
On x86 systems, SSBD is enabled per-process, either by tagging the executable with the ssbd elf tag (see ld(1)) or by executing the process via the sxadm command and enabling the feature.
On affected Intel systems with the 2021.2 IPU or later microcode updates, the SSBD extension also enables the Predictive Store Forwarding Disable (PSFD) mitigation for CVE-2021-0145.
TAA_NO is a readonly extension that has a status of enabled if and only if the CPU supports the Intel TSX feature and is not vulnerable to the TSX Asynchronous Abort (TAA) vulnerability (CVE-2019-11135) due to a hardware mitigation provided by the CPU.Otherwise, it has a status of not supported.
TSX_DISABLE is a readonly extension that has a status of enabled if the kernel has disabled TSX via an available control register.If both TAA_NO and TSX_DISABLE have a status of not supported, and MDS_NO also has a status of not supported, TAA may be mitigated by enabling the MD_CLEAR extension and rebooting if not already enabled.If MDS_NO has a status of enabled, then if both TAA_NO and TSX_DISABLE have a status of not supported, TAA can not be mitigated and a microcode update is necessary before TAA can be mitigated.
UMIP is a mechanism on Intel CPUs that restricts the execution of specific instructions if the CPU is running outside of its highest privileged mode (e.g. running in user mode).This is a security feature to prevent potential manipulation of system software data structures by malicious userland applications.It is enabled by default when it is supported by the hardware.
A reboot is required after enabling or disabling UMIP for the changes to take effect.
By default, the global zone and all non-global zones have the ASLR, NXHEAP, ADIHEAP, ADISTACK, and SSBD extensions enabled only for tagged binaries, while the NXSTACK extension is enabled for all processes.
セキュリティー拡張には 1 つ以上のプロパティーを設定できます。すべての拡張に model プロパティーがあります。このプロパティーは、拡張が適用される対象を定義します。次の model プロパティーがあります。
すべてのプロセスに対してセキュリティー拡張を有効にします。
タグ付けされているバイナリに対してセキュリティー拡張を有効にします。
セキュリティー拡張システムのデフォルトに従います。「セキュリティー拡張」を参照してください。
セキュリティー拡張に追加のプロパティーが存在する場合もあります。
NXHEAP および NXSTACK にはロギングプロパティーがあり、これが有効になっている場合、実行不能なメモリー範囲 (NXSTACK の場合はスタック、NXHEAP の場合はヒープとデータ) から実行が試行されると報告されます。
ロギングを有効にします。
ロギングを無効にします。(デフォルト構成)
sxadm のサブコマンド enable、disable、set、および delcust を使用すると、システム全体のセキュリティー拡張を変更できます。たとえば、次の sxadm コマンドは、拡張をシステム全体で有効にします。
# sxadm enable nxstack # sxadm enable aslr,nxheap
次の sxadm コマンドも拡張をシステム全体で有効にしますが、各プロパティーを明示的に指定しています。
# sxadm enable -c model=all aslr # sxadm enable -c model=all -c log=enable nxstack
また、sxadm のサブコマンド exec を使用すると、セキュリティー拡張をプロセスに対して有効または無効にすることができます。このサブコマンドは、セキュリティー拡張のステータスにのみ影響します。拡張のほかのプロパティーは、すべてシステムプロパティーから継承されます。次の sxadm コマンドにより、foobar プロセスは必ず拡張が無効になった状態で実行されます。
$ sxadm exec -s aslr=disable -s nxheap=disable foobar
セキュリティー拡張はまた、smf(7) を使用してシステム全体で構成することもできます。セキュリティー拡張サービスは system/security/security-extensions であり、プロパティーは '[extension]/[property]' の形式で指定されます。ここで、extension はセキュリティー拡張の名前であり、property はアクセスするプロパティーの名前です。
拡張ステータスは、'[extension]/config' プロパティーを使用して構成できます。これは、次の値を持つことがあります。
enable: the extension is enabled at boot disable: the extension is disabled at boot default: the extension has the Oracle provided default setting
All extensions in Oracle Solaris are shipped with configuration=default.
個々の実行可能ファイルには、次の ld(1) オプションで構築する際に、セキュリティー拡張の要件をタグ付けできます。
ADI ヒープアロケータの使用タグ付けを制御します。
ADI スタック保護のタグ付けを制御します。
Control ASLR tagging.
実行不能ヒープのタグ付けを制御します。
実行不能スタックのタグ付けを制御します。
Control SSBD mitigation tagging.
The mode can be enable or disable.mode が指定されていない場合、デフォルトは enabled です。
タグ付けされた実行可能ファイル内に定義されているセキュリティー拡張は、システム全体のセキュリティー設定と次のように相互に作用します。
特定の拡張を無効にするタグ付けされた実行可能ファイル内のセキュリティー設定は、システムのセキュリティー設定にかかわらず尊重されます。
特定の拡張を有効にするタグ付けされた実行可能ファイル内のセキュリティー設定は、システムのセキュリティー設定が tagged-files である場合にのみ尊重されます。
sxadm exec で指定されたセキュリティー設定は、タグ付けされた実行可能ファイルの設定をオーバーライドします。
sxadm コマンドには次のサブコマンドがあります。
現在のゾーンに対して指定したセキュリティー拡張を有効にします。–c オプションにより sxadm で特定の拡張のプロパティー値を渡すことができます。
拡張が構成可能でない場合、このコマンドは失敗します。変更にリブートが必要な場合、拡張ステータスは変更されず、この拡張は FLAGS 出力でリブート時の保留中の変更としてマークされます。
セキュリティー拡張の特定の構成で、指定した command を実行します。コマンド行に明示的に構成されていない各セキュリティー拡張に対しては、システム構成が使われます。command によって生成された子プロセスは、コマンド行で指定されたセキュリティー拡張の構成を継承しません。継承は –i オプションを使用して有効にできます。setuid と特権バイナリはどの構成も継承しません。複数の –s オプションを使用して、コマンド行から複数の構成を表すことができます。同じ拡張が複数回構成されている場合、最後の構成が優先されます。次の例で、foobar は ASLR が有効になった状態で実行されます。
$ sxadm exec -s aslr=disable -s aslr=enable foobar
sxadm exec サブコマンドは、デバッガがデバッガによって直接起動された単一のプロセスに適用される一般的な例に対応するように設計されています。もっと複雑なシナリオでは十分でないことがあります。その場合は、sxadm を使用して、システムまたはゾーンレベルのセキュリティー拡張のデフォルトを変更するか、デバッグを容易にするために、ld(1) を使用して、オブジェクト単位でのタグ付けを適用する必要がある可能性があります。
この機能が有用になるのは主に、ランダム化されたシークレットに基づく拡張 (ASLR など) がアクティブになっているときです。このような場合、メモリーアドレスの変更によってデバッグシナリオが複雑になる可能性があるためです。この機能は、セキュリティー拡張の構成が異なっているアプリケーションを明示的にテストする場合にも役立ちます。
拡張をデフォルト構成に復元します。このオプションは実質的にすべてのカスタマイズ内容を削除します。
現在のゾーンに対して指定したセキュリティー拡張を無効にします。
sxadm に関する使用法の情報または各サブコマンドの詳細情報を表示します。
現在のゾーンのすべてのセキュリティー拡張のステータスに関する情報を報告します。–p オプションを指定した場合、出力は簡単に解析可能な形式で表示されます。コマンド行にextensionを指定すると、特定の拡張にフィルタします。
マシン解析可能な出力はコロン区切りのフィールドのリストです。
extension:status[.model]:configuration[.model]:flag[[.flag]...]
各表記の意味は次のとおりです。
拡張の名前
拡張の現在のステータス (有効または無効)
セキュリティー拡張に対して現在有効になっているモデル (all、default、tagged-binaries)
拡張の保存されている構成 (有効、無効、またはシステムデフォルト)
拡張を記述したフラグ。各フラグは、フラグのフィールド内で「.」で区切られます。
拡張の FLAGS は次のとおりです。
u: userland security extension k: kernel security extension c: the extension is configurable r: configuration changes require a reboot p: the extension has pending configuration changes which will be activated upon reboot
文字のコロン (:)、NULL 記号 (\0)、および改行 (\n) は、どのコンポーネントにも使用できません。
セキュリティー拡張のプロパティーの値を表示します。すべてのプロパティーを表示するには、property をトークン「all」として定義できます。拡張が指定されている場合は、指定された拡張のプロパティーの値だけを表示します。プロパティーごとに、次の列が表示されます。
extension: the extension the property refers to name: the name of the property value: the value of the property
デフォルトでは、すべての列が表示されます。特定の列またはすべての列を指定するには、–o オプションを使用します。–p オプションを指定した場合、出力は簡単に解析可能な形式で表示されます。そのような形式は、フィールドをコロンで区切ったリストです。
extension:name:value
文字のコロン (:)、NULL 記号 (\0)、および改行 (\n) は、どのコンポーネントにも使用できません。
指定された拡張のプロパティーに値を割り当てます。
$ sxadm status -p -o extension,status aslr:enabled.tagged-files:u.c nxstack:enabled.all):u.c [...] $ $ sxadm status EXTENSION STATUS FLAGS aslr enabled (tagged-files) u-c--- nxstack enabled (all) u-c--- [...] $使用例 2 set/get を使用してセキュリティー拡張のプロパティーを設定/取得する
$ sxadm get model aslr EXTENSION PROPERTY VALUE aslr model default # sxadm set log=enable nxheap # sxadm get log nxheap EXTENSION PROPERTY VALUE nxheap log enable使用例 3 デバッグセッションの実行
次のコマンドシーケンスは、ASLR を無効にして実行されているデバッグセッションを示しています。
$ sxadm exec -i -s aslr=disable /bin/bash # Because all processes (except privileged ones) inherit the # (disabled) ASLR configuration, commands such as mdb and truss # have repeatable results. $ truss -t mmap /bin/true mmap(0x00000000, 32, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFE5B0000 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFE5A0000 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFE590000 [...] $ truss -t mmap /bin/true mmap(0x00000000, 32, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFE5B0000 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFE5A0000 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFE590000 [...] $ truss -t mmap /bin/true mmap(0x00000000, 32, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFE5B0000 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFE5A0000 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFE590000 [...]
コマンドが正常に完了しました。
エラーが発生したため、コマンドが終了しました。
属性についての詳細は、マニュアルページの attributes(7) を参照してください。
|
ld(1), exec(2), sx_enabled(3C), adi(7), attributes(7)
Oracle ILOM Administrator's Guide for Configuration and Maintenance Firmware Release 4.0.x
Fujitsu XSCF Reference Manual
The sxadm command was added in Oracle Solaris 11.1.0.
Support for the following security extensions was first added in the listed Oracle Solaris release:
|
The SSBD extension for SPARC systems was originally delivered in Oracle Solaris 11.4.5 under the name HW_SSB, and was then renamed to SSBD in 11.4.18.