JP2004272816A - System and method for performing multitask - Google Patents

System and method for performing multitask Download PDF

Info

Publication number
JP2004272816A
JP2004272816A JP2003065685A JP2003065685A JP2004272816A JP 2004272816 A JP2004272816 A JP 2004272816A JP 2003065685 A JP2003065685 A JP 2003065685A JP 2003065685 A JP2003065685 A JP 2003065685A JP 2004272816 A JP2004272816 A JP 2004272816A
Authority
JP
Japan
Prior art keywords
task
confidential information
information holding
holding area
tasks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003065685A
Other languages
Japanese (ja)
Other versions
JP4375980B2 (en
Inventor
Takeshi Inamura
雄 稲村
Setsuyuki Hongo
節之 本郷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Docomo Inc
Original Assignee
NTT Docomo Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NTT Docomo Inc filed Critical NTT Docomo Inc
Priority to JP2003065685A priority Critical patent/JP4375980B2/en
Publication of JP2004272816A publication Critical patent/JP2004272816A/en
Application granted granted Critical
Publication of JP4375980B2 publication Critical patent/JP4375980B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an environment where a plurality of tasks to be simultaneously performed in parallel are performed without allowing another task to read important information, in a modern computer operating system for supporting a multitask environment. <P>SOLUTION: A multitask performing system successively performs a plurality of tasks by a single CPU, and virtually processes a plurality of tasks in parallel. The system includes: confidential information holding areas 202-204 to correspond to each task; an enciphering key storage area 201 which is set to be intrinsic to each one of the confidential information holding areas 202-204 and stores key information to encipher the areas 202-204; and a cipher engine 103 for enciphering the confidential information holding areas 202-204, which are related to the task to be stopped when the operating system changes-over the tasks, through the use of key information when the tasks are changed-over. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、コンピュータにおけるセキュリティ技術に係り、擬似的(TSS環境)もしくは実際に(SMP環境)複数のタスクを同時並列に実行することができるマルチタスク実行システム及びマルチタスク実行方法に関する。
【0002】
【従来の技術】
近年、個人の使用するパーソナルコンピュータ(PC)から電子商取引(EC)等のサービスを提供するサーバコンピュータ、さらにはスーパーコンピュータまで、事実上あらゆる計算機がマルチタスク環境を提供するものとなっている。
【0003】
ここでいうマルチタスク環境とは、計算機が扱う処理の単位である『タスク』を複数個同時に実行させることを可能とする環境であり、それらのタスクは、単一の中央演算装置(CPU)を用いた計算機では、TSS(Time Sharing System,時分割型)による擬似的な並列実行を、複数のCPUを実装した計算機ではSMP(Symmetric Multi Processor)構成を取ることで、真に同時並列的な実行を実現している。
【0004】
このようなマルチタスク環境では、どのようにして個々のタスクが保持する機密データを他のタスクから保護するのかが問題となる。これは電子商取引に用いるサーバなど重要な情報を扱わなければならない計算機では特に影響が大きいと考えられる。
【0005】
例えば、インターネットを利用して電子商取引を行う場合、SSL(Secure Sockets Layer、米国特許第5,825,890号。Elgamal, et al. ”Secure socket layer application program apparatus and method”,October 20,1998)と呼ばれる仕組みでブラウザ/ウェブサーバ間の通信を保護するというのが一般的となっている。
【0006】
ところが、このSSLを安全に機能させるためには、ウェブサーバに当該サーバ以外には知ることのできない固有の秘密鍵をインストールする必要がある。サーバはアクセスしたユーザに対してその秘密鍵を利用して自らの身元を証明するが、万一この秘密鍵が他者の知るところになれば、当該他者は
1.当該秘密鍵を利用して当該サーバへのなりすまし
2.当該秘密鍵に対応した公開鍵によって暗号化されるブラウザ/サーバの通信セッション開始時のやり取りを傍受することにより、そこで交換された共通鍵によって暗号化される実際の通信の復号及び内容の傍受
といった攻撃が可能となってしまう。
【0007】
このような危険を避けるため、従来では、当該秘密鍵は一般的には暗号化処理を受けた上でファイル等に保管されるような運用がなされている。これにより、ディスク上に保管されている状態では秘密鍵の安全性は保護のために利用される暗号技術の強度の範囲内で保証されるが、ウェブサーバプログラムが実行されるときには、当該秘密鍵はファイルから読み出され、復号された上で当該アプリケーションプログラムのために確保されたメモリ上に平文(非暗号文)のままで保存されることになる。
【0008】
このとき、同じサーバ計算機上で同時に実行される他のタスクが当該秘密鍵情報の保存されているメモリ領域にアクセスし、平文状態のデータを読み出すことができれば、容易にウェブサーバの秘密鍵を知ることができてしまうため、上に述べたような攻撃の実施が可能となる。このように、機密情報を保持するメモリを同時実行される他のタスクから保護することは、マルチタスクが一般的となっている現代的な計算機環境では特に重要性を増している。
【0009】
マルチタスク環境をサポートする多くのオペレーティングシステムでは、タスク毎に仮想記憶空間を割り当て、各タスクがアクセスする仮想的なメモリ領域と物理的なメモリ領域とのマッピングを管理することにより、一つのタスクが保持するメモリ上のデータに対して他のタスクがアクセスすることはできないような配慮がなされている。
【0010】
しかしながら、実際には、稼動中のタスクに関してデバッグが必要な場合等のために実行中のタスクに対してデバッガを接続し、当該タスクのメモリ領域や実行状態をモニタリングする機能が提供されているため、このモニタリング機能を悪用した精査、いわゆるハッキングが可能となることから、上述したようなオペレーティングシステムによる保護は完全ではない。特に悪意を持った計算機の管理者権限を持つユーザが存在する場合、上記モニタリング機能を利用して、秘匿情報の読み出しが可能となる。
【0011】
なお、ここでいう『管理者権限を持つユーザ』は、必ずしも正規の計算機管理者であるとは限らない。近年の計算機環境に対して大きな脅威となっているのは、管理者権限下で実行することが要請されるタスクのプログラムコード中に存在するセキュリティ・ホールを利用して、”シェル”と呼ばれるコマンド実行環境を奪取するというものであり、管理者権限の下で動作するそのようなシェルを入手した攻撃者は、管理者として事実上任意の操作を行えることになる。そのような操作としては、先に述べたデバッガによる実行中タスクの精査の他に
・タスクのメモリ空間に存在する全情報のファイルへの書き出し
・実メモリ容量の枯渇に伴いスワップファイルと呼ばれるハードディスク等の二次記憶領域に待避されたタスクメモリの精査
等の攻撃が考えられる。
【0012】
また、前述したSSLを始めとして暗号技術を利用した通信データの保護を提供する仕組みは各種考案されているが、それらは事実上すべて秘密鍵をメモリに読みこんだ形でタスクが実行されるようになっているため、ネットワーク上ではなくその実行環境である計算機自体に対して攻撃が加えられる場合、いずれも大きな脆弱性を持つことが知られている。
【0013】
このような問題を解決するための従来技術としては、大別して二種類の解決策が考案されいる。一つは管理者権限の細分化という主としてソフトウェア的な解決策であり、もう一つは機密情報を物理的/論理的に隔離するという手立てである。
【0014】
前者に属する技術としては、いわゆる”トラステッドOS”として知られるオペレーティングシステムが該当する。これらのオペレーティングシステムは、基本的には管理者権限を細分化することで絶対的な権限を持ったタスクの実行を可能な限り減らすという戦略を採っている。また、アクセスコントロールリストと呼ばれる機能を用いることで、ファイル等のデータに対するアクセス管理も従来のオペレーティングシステムより詳細に設定可能となっており、あるタスクが同時並列的に実行される他のタスクの情報にアクセスすることが非常に困難であるように図られている。
【0015】
この種のトラステッドOSが採用している権限及びアクセス管理手法の詳細化による保護強化という方針は、基本的にはオペレーティングシステムというソフトウェアのみで実現できるため、特別なハードウェアを必要とせず比較的低コストで済むという利点がある。一方、オペレーティングシステムの保護機能によって他のタスクから隔離されているとはいえ、タスクのメモリ上ではデータは平文のまま保持されているため、同メモリ上のデータに攻撃者がアクセスする手段が開発された場合、機密情報が漏洩する可能性がある。
【0016】
一方、後者の対策に関してはさらに
a)機密情報を扱う部分を計算機から物理的に分離することによる隔離
b)機密情報を含むデータを単一のタスクのみが復号できる形で暗号化することによる保護
という二つの方向性がある。
【0017】
a)はいわゆる”耐タンパー性デバイス”、すなわち、内部に保持されているデータを読み出すことが困難であるような機器に機密データを保持することで他者からの干渉を排除しようというものである。耐タンパー性デバイスは一般にデータの保存領域の他に独自の演算処理装置も装備されているため、機密情報を外部に洩らすことなく処理することを可能とする。
【0018】
このような耐タンパー性デバイスによって機密情報の防御を行う例としては、個人の秘密情報を保護するためのスマート・カードや、公開鍵暗号技術を利用してデジタル証明書を発行する認証機関の秘密鍵を保護するために主として使われるHSM(ハードウェア・セキュリティ・モジュール)等がある。また、暗号関連処理の高速化を主目的とするSSLアクセラレータ等のハードウェア製品のなかにも、秘密鍵等の機密情報を外から読み出すことができないような構成となっているものが存在するが、そのような製品もこのa)に相当する対策とみなすことができる。
【0019】
しかしながら、このような耐タンパー性デバイスを用いる対策には本質的に柔軟性に欠けるという欠点が存在する。大半の耐タンパー性デバイスは例えば『入力として与えられた暗号化済みデータを秘密鍵によって復号する』といった特定の機能しか持っていないため、当該デバイスがサポートしている以外の形で機密情報を保護することは困難となる。
【0020】
耐タンパー性デバイスのなかにはJava(登録商標)アプレット等の形で任意のアプリケーションをインストールすることにより、機能を拡張できるようになっているものも存在するが、そのような形で柔軟性を得ようとすると、今度はインストールされるアプリケーション自体がウイルス等の悪意あるものではないことを保証することが難しくなる。
【0021】
また、大半の機密情報というものはその値そのものを知られないことが重要である他、実際にはその機密情報を用いた処理を権限者以外に行われてしまうという状況も防がなければならない。攻撃者にとっては秘密鍵そのものを知ることとその秘密鍵を用いて任意のデータに対して電子署名をすることとはほとんど差異がないからである。耐タンパー性デバイスによって秘密情報そのものを他者に知られる可能性自体は低く抑えられるとしても、当該デバイスが権限を持たない者による指示に基づいて当該秘密情報を用いた操作(例えば秘密鍵による暗号化済みデータの復号処理)を行い、その結果を返してしまうときには、所期の目的は達成されないことになる。
【0022】
一般に、計算機に接続される耐タンパー性デバイス等の外部デバイスへのアクセスはオペレーティングシステムにより管理されることになるが、そのアクセス管理機能が侵された場合、マルチタスク環境では権限を持たないユーザにより当該耐タンパー性デバイスを濫用される可能性が排除できない。
【0023】
一方、上記b)は、タスクのメモリ中に存在するデータを暗号化することによって他のタスクによる干渉から回避するものである。この方法では、メモリに保存されたデータをそのタスクでしか復号できないような形で暗号化しておくことにより、他のタスクが当該タスクのメモリにアクセスしたとしても、そのデータは解読できない暗号データとしてしか認識されないため、機密データに対してa)の方策よりも強力な保護を提供することが可能となる。
【0024】
例えば、従来技術である米国特許第5,224,166号(Hartman,Jr.”System for seamless processing of encrypted and non−encrypted data and instructions”,June 29,1993)では、外部記憶及びメモリ上ではデータ領域/コード領域ともに暗号化された形で保存され、それらのデータ/コードを中央演算装置内の物理的に安全な領域に置かれたキャッシュ領域に読み込む際に復号することで他のタスクからの不正なアクセスを排除するシステムが提案されている。
【0025】
暗号化されたデータを復号するための鍵も同じく物理的に安全な領域中に置かれ、不正な利用が不可能となるように管理される。このシステムでは復号された平文データは物理的に安全な領域に位置するキャッシュ領域のみに置かれ、それらがCPUのキャッシュ・ライトバックによりメモリに書き戻される際には自動的に暗号化されることで機密性が確保される。
【0026】
また、別の従来技術である日本国特許、特開2001−318787号(橋本幹生他,”マイクロプロセッサ、これを用いたマルチタスク実行方法、及びマルチスレッド実行方法”,平成12年5月8日出願)(特許文献2)では、同様にメモリ上のデータをキャッシュに読み出す、もしくは逆方向に書き出す際に復号処理/暗号化処理を行うことに加えて、コンテクスト切り替えと呼ばれるオペレーティングシステム機能実施時に実行レジスタ等のタスクの固有情報をも暗号化することで、前述したデバッガ利用等による攻撃をも未然に防ぐシステムが提案されている。
【0027】
【特許文献1】
米国特許第5,224,166号明細書
【0028】
【特許文献2】
特開2001−318787号公報
【0029】
【発明が解決しようとする課題】
上述した、二例の従来技術は、基本的にはマイクロプロセッサに対する追加機能としてデータもしくはコードの暗号化/復号を行うためのハードウェアモジュールをプロセッサ内部(プロセッサ内キャッシュとシステムバスとの間)に実装するというものである。
【0030】
これらの従来技術では、ハードウェア的にマイクロプロセッサを拡張するという手法は最大限のパフォーマンス的な利益を得ることをできるため、これら従来技術のようにメモリ中に置かれるデータ領域及びコード領域すべてを暗号化し、実行の過程でそれらをリアルタイムに復号/再暗号化するというようなシステムを実現するためには、最適なものと考えられる。
【0031】
しかしながら、近年の最先端のマイクロプロセッサは高度な研究開発力及び技術的ノウハウの集積物であり、そのような既存のマイクロプロセッサシステムのなかに新たなハードウェアを追加することで全体的な複雑性を増大させることは実用的ではない。
【0032】
また、すべてのデータをメモリからキャッシュへの読み出し、もしくは書き出しというタイミングで動的に復号/暗号化処理を行うという仕組みは、実行性能に関して大きな悪影響を与えることが考えられる。例えば、メモリアクセスに関して現在の最新テクノロジーでは数GB/secという最大性能が得られるが、ハードウェアによる暗号化処理性能は高々Gb/secレベルであるため、それだけでも純粋なメモリアクセス性能が1/10以下に落ちる可能性がある。
【0033】
近年のマイクロプロセッサでは、基本的により高速なプロセッサをより低コストで提供する要請が大きいため、このような性能に対して負の影響を与えるような機能追加は妥当ではないといえる。このため、マルチタスク環境での機密保護という仕組みも、マイクロプロセッサ本体の機能とは分離して実現することが望まれる。
【0034】
そこで、本発明は、以上の点に鑑みてなされたもので、マルチタスク環境をサポートする現代的な計算機オペレーティングシステムにおいて、同時並列的に実行される複数のタスクが他のタスクから重要な情報を読み出されることなしに実行できる環境を実現することのできるマルチタスク実行システム及びマルチタスク実行方法を提供することを目的とする。
【0035】
【課題を解決するための手段】
上記課題を解決するために、本発明は、単一のCPUによって複数のタスクを順次実行し、複数のタスクを仮想的に並列処理するマルチタスク実行システムであって、各タスク毎に対応付けられる機密情報保持領域と、各機密情報保持領域に固有に設定され、各機密情報保持領域を暗号化するための鍵情報を格納する暗号化鍵記憶領域と、オペレーティングシステムによるタスク切り替え時に停止状態となるタスクに関連付けられた機密情報保持領域を、当該タスク切り替え時に、鍵情報により暗号化する暗号処理部とを備える。
【0036】
また、本発明は、複数のCPUにより複数のタスクを並列処理するマルチタスク実行システムであって、各タスク毎に対応付けられる機密情報保持領域と、各機密情報保持領域に固有に設定され、各機密情報保持領域を暗号化するための鍵情報を格納する暗号化鍵記憶領域と、オペレーティングシステムによるタスク切り替え時に停止状態となるタスクに関連付けられた機密情報保持領域を、当該タスク切り替え時に、鍵情報により暗号化する暗号処理部と、機密情報保持領域毎にアクセス権を設定し、機密情報保持領域に対するアクセス制限を行うアクセス制御部とを備える。
【0037】
上記発明においては、暗号処理部により暗号化された機密情報保持領域を、当該タスク切り替え時に、前記鍵情報により復号する復号処理部を有することが好ましい。なお、上記暗号処理部及び復号処理部は、CPUとは別途独立に設けられたハードウェアとすることができる。
【0038】
上記発明においては、鍵情報は、タスクの生成処理時や、オペレーティングシステムの起動時に生成することができる。この場合、新規なタスクの生成処理時に、既存のタスクから複製され、新規なタスクと既存のタスクとで共有される機密情報保持領域に格納される情報について、当該新規なタスクに対し、既存のタスクに対応付けられた鍵情報とは別途独立な鍵情報を生成することが好ましい。
【0039】
このような上記発明では、タスクの切り替え、すなわちコンテクストスイッチを行うオペレーティングシステムのカーネルの動作に基づいて、コンテクストスイッチが実行されるタイミングで機密情報の暗号化及び復号処理を行う。詳述すると、あるタスクに割り当てられたCPU利用時間が終了した、或いは入出力待ち等で実行が中断する等の原因で発生するコンテクストスイッチ処理では、レジスタ上のデータも含めて当該タスクの実行に必要なすべての情報が当該タスク専用に割り当てられる領域に保存された上で、同様に保存されている別のタスクの情報をレジスタにロードし実行が再開される、という処理が行われる。
【0040】
すなわち、本発明においてカーネルは、コンテクストスイッチに際し、
(1)実行状態から休止状態に移行させられるタスクに関しては当該タスクが保持する機密情報をそのタスク専用の鍵で暗号化する
(2)休止状態から実行状態に復帰させられるタスクに関しては、前回休止状態に移行される際に暗号化されている機密情報を当該タスク専用の鍵で復号する
といった処理を実行する。
【0041】
また、本発明によれば、システムコールを利用するアプリケーションプログラムのプログラミング時において、機密性が必要とされるデータ及び当該データを格納する機密情報保持領域を明示的に指定し、その特定領域のみを、リアルタイムにではなく必要に応じた特定のタイミング、すなわちタスクの切り替え時に秘匿処理を行うことができる。なお、ここでいうデータの秘匿処理には、従来より利用されているような各種暗号技術利用したものの他、情報隠蔽技術(Steganography)を用いることができる。
【0042】
さらに、本発明によれば、プログラム実行中にリアルタイムでの秘匿処理を実施する必要はなくなるため、マイクロプロセッサ内部に特別な機構を加える必要がなく、チップセットや拡張ボード等のハードウェアを追加するという形態や、さらにはソフトウェアのみによる形態で実現することが可能となり、既存のシステム及び装置を有効に利用することができる。
【0043】
また、上記発明においては、タスクの仮想メモリ中の機密情報がスワップファイル等の二次記憶領域に保存されたか否かを判断する退避判定手段を備え、暗号処理部は、保存が実行されていない場合に、暗号化処理を実行することが好ましい。
【0044】
この場合には、二次記憶上のスワップファイルに退避させられたデータを精査し、タスクのメモリ上に存在する重要な機密データがハッキングされる可能性を回避することができる。すなわち、複数のタスクが仮想的に同時並列的に実行されるマルチタスク実行環境において、一つのタスクが実行されている場合に、それ以外のすべてのタスクが停止状態となり、実行継続に必要となる情報を保存するシステムであっても、デバッガによる実行中のタスク内部状態を精査し、保存された情報を解析し、秘匿情報が漏洩することを回避することができる。
【0045】
また、本発明では、スワップファイルへの書き出しの時点における暗号化処理を要することなく、退避が必要なデータを保護することができる。詳述すると、スワップファイルへのメモリデータの書き出しという処理が発生するのは、実行中のタスクからのメモリ要求が満たせなかった場合であり、この書き出し処理はカーネルの機能によって行われる。カーネルが動作する際には通常のユーザタスクはすべて休止状態にあるため、本発明を適用されたシステムの場合、それらタスクが保持する機密情報は既に暗号化された状態となっており、メモリ上に存在する任意のデータがスワップファイルに書き出され、さらにそのスワップファイルの中身が攻撃者によって精査されたとしても、機密情報の漏洩を回避することができる。。
【0046】
さらに、本発明によれば、複数のCPUを搭載するいわゆるSMP(Symmetric Multi Processor)構成の計算機において、同時に複数のタスクがそれぞれ別個のCPUを占有することにより、真に同時並列的に実行が行うシステムであっても、あるタスクの実行中に、機密データ保持領域が平文のままという状態で存在するのを回避し、他のタスクからの操作により、当該領域が漏出するのを防止することができる。
【0047】
すなわち、本発明では、他のタスクによって機密データが漏出するのを防止するために、SMP構成の計算機で用いる場合には、単にコンテクストスイッチ時に暗号化/復号化を行うだけではなく、実行中の機密情報を保持するメモリ領域が他のタスクからアクセスできないように制限することができる。
【0048】
具体的には、メモリ領域に対して特定のタスクのみからしか参照できないという属性の付与するとともに、機密情報保持用メモリ領域には同属性を付与する、といった機能をSMP対応オペレーティングシステムカーネルに追加する。
【0049】
なお、メモリデータにも一般的なファイルと同じく書き込み権限、読み出し権限、実行権限等の各種属性が存在し、これらの各属性の設定をサポートするために通常オペレーティングシステムにはあるメモリ領域がどのような属性を持っているのかを管理する機能が備えられていることから、既存のオペレーティングシステムの構成を大幅に変更することなく、上記属性を追加することは可能である。
【0050】
【発明の実施の形態】
[第1実施形態]
本発明の第1実施形態について説明する。図1は、本発明のマルチタスク実行システムを単一CPUシステムに適用した場合を例示するブロック図である。
【0051】
同図に示すように、本実施形態の情報秘匿システムは、ハードウェア100と、メモリ空間200とから構成されている。ハードウェア100は、マイクロプロセッサ101と、メモリ102と、暗号処理エンジン103とがシステムバス104によって結合されている構成される。
【0052】
なお、暗号処理エンジン103は、システムバス104ではなくPCIのような、I/Oコントローラ105を介して、ハードウェア100の外部に接続された外部バス107に実装される増設ボード106など、メモリ102との間でのDMA転送が可能な装置を採用することができる。また、暗号処理エンジン103としては、上述した103や106のように、ハードウェアを用いずに、オペレーティングシステム自身がソフトウェア的に暗号化処理を実施するようにしてもよい。すなわち、本実施形態に係るマルチタスク実行システムでは、特定のハードウェア形態に捕らわれずに情報秘匿を実施できるという柔軟性を確保することができる。
【0053】
上記メモリ空間200は、ハードウェア100の上で動作するオペレーティングシステムで確保される仮想メモリ領域であり、各タスクに対応付けられた機密情報保持領域202〜204と、オペレーティングシステムカーネルメモリ内に設けられ、前記機密情報保持領域202〜204に対応付けられた鍵を保持する暗号化鍵保持用配列201を有する。
【0054】
機密情報保持領域202〜204は、実行中のタスクが、オペレーティングシステムカーネルによって休止状態に遷移させられる際に、当該タスクに対応する鍵によって暗号化され、休止状態のタスクが実行状態に遷移させられる際に、当該タスクに対応する鍵によって復号化される記憶領域である。
【0055】
暗号化鍵保持用配列201は、当該オペレーティングシステムがサポートする最大タスク数(例えば、一般的なUNIX(登録商標)系オペレーティングシステムであれば65536個)に等しい要素数を持つ暗号化鍵を保持するための記憶領域であり、この暗号化鍵保持用配列201は、オペレーティングシステムカーネルのみからアクセス可能とするようにアクセス権が設定されている。このアクセス権については、後述する。
【0056】
そして、暗号化鍵保持用配列201に保持される個々の鍵は、対応するタスク番号を持つタスクのメモリ中でプログラミング時に指定される機密情報保持領域202〜204を処理するために用いられる。具体的には、実行中のタスクがオペレーティングシステムカーネルによって休止状態に遷移させられる際に、当該タスクに対応付けられた機密情報保持領域(202,203,204等)が当該タスクに対応する鍵によって暗号化される。
【0057】
逆に、休止状態から実行状態に遷移させられるタスクに関しては、当該タスクの休止処理時に暗号化された機密情報保持領域205を当該タスクに対応する鍵によって復号した上で、実行が再開されることになる。
【0058】
図2は、本実施形態において、オペレーティングシステム起動時に必要とされる処理を示すフローチャート図である。ここでは具体例として4.4BSDオペレーティングシステムで行われる処理を挙げるが、本発明はこれに限定されるものではなく、他の方式のオペレーティングシステムでも利用することが可能である。
【0059】
同図に示すように、オペレーティングシステム起動時にあっては、先ずブートプログラムと呼ばれる小規模なプログラムが起動され(S101)、そのブートプログラムによってオペレーティングシステム本体がメモリ上にロードされる。次いで、CPUの種類の同定や搭載メモリ容量の検査等のアセンブリ言語によって記述されたスタートアップルーチンが実行され(S102)、C言語で記述されたオペレーティングシステム主要部分の実行準備が行われる。
【0060】
その後、実行される機種に依存する初期化処理により、オペレーティングシステムが利用する各種システムデータの準備が行われる(S103)、これにより、暗号化鍵保持用の暗号化鍵保持用配列201が占めるメモリ領域は、この部分で割り当てられることになる。その後、機種に依存しない初期化処理を(S104)を行う。
【0061】
ここで、オペレーティングシステムが実行されるマイクロプロセッサ101のメモリ管理ユニットが適切な機能(例えば、後述するMIPS等)を持っている場合について説明する。
【0062】
本実施形態において、暗号化鍵保持用配列201は、カーネル中の、機密情報保持に関連する部分が実行されている期間のみ当該領域を読み書きできる状態に設定する機能を備え、管理者権限で実行されるタスクであっても当該領域に対してアクセスできないように制限されている。
【0063】
これにより、オペレーティングシステムがデバッグ等の目的で物理メモリに対するアクセスを可能とするようなインターフェースを備えている環境であっても、機密情報を保持することができる。例えば、4BSDではファイルシステム中に/dev/memという名前で物理メモリを読み書きするためのインターフェースが提供され、管理者権限をもったユーザタスクであれば、このインターフェースを利用して暗号化鍵保持用配列部分を読み出せるような場合であっても、本実施形態のように、暗号化鍵保持用配列201に対する読み書きについて制限を設けることで、機密情報が漏出のを回避することができる。
【0064】
なお、上述した適切なメモリ管理ユニットを持つハードウェアの例としては、図3に示すような、マイクロプロセッサのひとつであるMIPSが挙げられる。
【0065】
すなわち、同図に示すように、このMIPSアーキテクチャでは、マイクロプロセッサ101中に存在するハードウェアであるTLB(Translation Look−aside Buffer)101aにより仮想アドレスと物理アドレスとの対応付けが行われる。この対応付けの際、具体的にどの仮想アドレスをどの物理アドレスにマッピングするかという決定はオペレーティングシステムカーネルによってなされる。
【0066】
本実施形態では、このようなマッピングを管理するため、オペレーティングシステムカーネルは自らの管理するメモリ中にTLB管理領域206を確保し、維持する。このようなハードウェア上で本実施形態を用いる場合にはTLB管理領域206及びマイクロプロセッサ中のTLB101aにおいて、秘密情報保持処理が実行されている間以外は暗号化鍵保持用の暗号化鍵保持用配列201に対してアクセスできないように設定しておく。これについて本実施形態におけるMIPSアーキテクチャの場合では、当該ページに対応するTLBエントリのValid(V)ビットをoffにすることで実現できる。
【0067】
なお、本実施形態では、MIPSマイクロプロセッサのアーキテクチャを具体例として挙げたが、本発明は、このような個別のマイクロプロセッサのみを対象とするものではなく、既存及び将来のマイクロプロセッサ全般に対して適用可能である。
【0068】
一般に、仮想アドレス及び物理アドレス間のマッピングは、メモリ管理ユニットがサポートするページ単位で行われるため、このようなハードウェアによるアクセス管理を適用する場合、暗号化鍵保持用配列201は、ページ単位で確保する。
【0069】
なお、本実施形態では、オペレーティングシステム起動時に行われるのは暗号化鍵保持用配列201に相当する領域の確保及びそのアクセス権設定操作のみであり、実際の暗号化鍵の生成は、タスク生成処理まで遅延される。
【0070】
これにより重要な機密情報である当該暗号鍵の生成を真に必要となるまで遅らせることで最大限の安全性を確保することができ、また、タスク番号は再利用され得るデータであるため、個々の鍵の寿命をひとつのタスク限りとすることで長期間同じ鍵を使い続けることによる機密情報漏洩の可能性を低減させることが可能となる。なお、タスク番号の再利用を考慮する必要がない環境ではオペレーティングシステム起動時に必要な鍵を生成するようにしてもよい。
【0071】
次いで、タスク生成処理時における暗号化鍵の生成処理について説明する。ここでは、システムコールに応じてタスクを生成する。新しくタスクを生成するための処理を図4に示す。
【0072】
本実施形態では、4.4BSDを含むUNIX(登録商標)系オペレーティングシステムを前提とし、このUNIX(登録商標)系オペレーティングシステムにおけるタスクの生成は、forkシステムコールの実行によって実現される。forkシステムコールは新しく生成されるタスクのための管理用データをオペレーティングシステム内に割り当て、さらに同システムコールを実行したタスクの仮想メモリ空間の完全な複製を、新規タスク用のメモリ空間として確保することで新しいタスクの実行環境を構築する。
【0073】
なお、本実施形態においてメモリ空間の複製の確保については、コピーオンライトとして知られるテクニックを用いることにより、古いタスクから複製された新しいタスクがメモリ領域に対してデータを書き込むまでは、実際に専用の物理メモリの確保は実行されない。一般に、forkシステムコールで生成された新しいタスクでは、続けてそれまで実行していたものとは異なる新しいプログラムコードをロードした上でゼロから実行を開始するため、このコピーオンライトのメカニズムを有効に実行することができる。
【0074】
図4では、タスクxが実行中にforkシステムコールを呼び出した結果として、新たにタスクyが生成された状態を表している。同図に示すように、この状態においては、タスクy用の管理データ210が新しく生成され、当該管理データ210は、forkシステムコール呼び出し元であるタスクx管理データ209の機密情報保持領域208を、コピーオンライト型参照で共有している。
【0075】
このようなタスク関連データ構造の他に、オペレーティングシステムカーネルメモリ中の暗号化鍵保持用配列201中には、新しいタスク番号yに相当する要素位置にタスクyのメモリ中の機密情報保護のための鍵を新規に設定する。この鍵は、タスクxのための鍵とは別途独立な異なる値であり、安全な擬似乱数データとしてforkシステムコール処理のなかで生成される。
【0076】
この結果、機密情報保持領域208は、タスクxとy双方によって共有されることになるが、当該領域を正しく復号できる鍵は同領域を生成したタスクxの鍵のみであるため、forkシステムコールの結果生成されたタスクyが同情報の内容を知ることはできない。このように親子関係にあるようなタスク間であっても、機密情報は当該情報を生成したタスクのみしかアクセスできないように規制される。
【0077】
また、タスク管理データ209や210中にはタスクの実行コンテクストの一部として、コンテクスト切り替え時にハードウェア資源の一部である各種レジスタに保存されていた値を退避するレジスタ退避領域209aや210aが確保されている。
【0078】
コンテクスト切り替え処理が発生した時点で機密情報の一部もしくは全部がこれらレジスタに格納されている可能性が存在するため、タスク管理データ中のレジスタ退避領域209aや210aに対しても、同様にタスク専用暗号化鍵で暗号化を行う。この場合、新しいタスクyのレジスタ退避領域210aに関してはタスクxのレジスタ退避領域をコピーした後、当該領域をタスクxの鍵で復号し、さらにタスクyの鍵で暗号化する処理を行う。
【0079】
さらに、本実施形態では、プログラマに対して機密情報保持領域を確保するために提供されるインターフェースが設けられている。図5はプログラマに対して機密情報保持領域を確保するために提供されるインターフェースの説明図である。
【0080】
この機能は、基本的に、C言語において動的なメモリ領域割り当てを提供するライブラリ関数malloc()と同等のインターフェースを持つsallocシステムコールによって実現される。
【0081】
すなわち、図5に示すように、このsallocシステムコールは、引数で与えられるサイズの連続したメモリ領域を新たにタスクのメモリ空間に割り付け(S201)、この割付けが成功したかを判断し(S202)、成功した場合には(図中ステップS202における”Y”)、その部分が機密情報保持領域に関する情報(先頭アドレス及びサイズ)をカーネルメモリ空間中に記録する(S204)。その後、確保されたアドレス空間の次の領域のアドレスを返却する(S205)。ステップS202において、割付けが成功しなかった場合(図中ステップS202における”N”)、NULL値を返却し(S203)、ステップS204以降の処理は実行しない。
【0082】
そして、このように確保されたメモリ空間に対して暗号化及び復号化を実行する処理は、以下の手順により行う。図6及び図7は、コンテクストスイッチ処理発生時に行われる暗号化及び復号化処理の概要を示す説明図である。
【0083】
先ず、暗号化を行う場合は、図6に示すように、コンテクストスイッチ処理により実行が中断させられ休止状態に遷移させられるタスクに関し、当該タスク用の機密情報暗号化鍵により退避されたレジスタ情報の暗号化を行った後(S301)、当該タスクの機密情報保持領域が存在するか否かについて判断を行い(S302)、機密保持領域が存在する場合(図中ステップS302における”Y”)、その存在する機密保持領域がスワップファイルに退避されているか否かについて判断を行う(S304)。ステップS302において、機密保持領域が存在しないと判断した場合(図中ステップS302における”N”)は、そのまま処理を終了する(S303)。
【0084】
ステップS304において、退避されていない領域が存在すると判断した場合(図中ステップS304における”N”)には、その領域を機密情報暗号化鍵によって暗号化する(S305)。一方、ステップS304において、当該領域がスワップファイルに退避されていると判断した場合(図中ステップS304における”Y”)、上記ステップS302に戻り、上記同様の処理を繰り返す。
【0085】
なお、ステップS304で、スワップファイルに退避されているかどうかを判定しているのは、最適化を図るためである。すなわち、このように判定することにより、機密情報保持領域すべて、一律に暗号化されるのを回避し、スワップファイルに退避されている情報を一時的に実メモリに読み込んだ上で暗号化処理を行うという重い処理を不要とすることができる。
【0086】
なお、本実施形態において、当該データ部分をスワップファイルに退避する処理は、カーネルにしか行えないことから、当該タスクがまさに実行されているコンテクストの途中でスワップ退避処理が行われることはなく、当該タスクが休止状態になった後に、スワップ退避処理が実行される。
【0087】
従って、本実施形態では、スワップ退避処理が実行される時点において、機密情報保持領域に対する暗号化による保護は実施されていることとなり、スワップファイルに退避される時点で機密情報保持領域は既に安全な状態となっており、そのようなスワップファイルに退避された機密情報保持領域に対しては、当該タスクの休止処理時における機密保持処理は、不要となる。
【0088】
次いで、休止状態から実行状態へと遷移させられるタスクに関する復号処理について説明する。
【0089】
図7に示すように、先ず、機密保持領域が存在するか否かについて判断を行い(S401)、機密保持領域が存在すると判断した場合(図中ステップS401における”Y”)には、当該領域がスワップファイルに退避されているか否かについて判断を行う(S402)。当該ステップS402において、等が要ろう域がスワップファイルへ退避されている場合には、ステップS401に戻り、ステップ401以降の処理を繰り返す。
【0090】
このステップS402において、スワップファイルに退避されていない領域が存在すると判断した場合(図中ステップS402における”N”)、当該タスクの機密情報保持領域のうち、先頭アドレスから、当該領域のサイズ分、機密情報暗号化鍵によって復号化を行う(S403)。
【0091】
一方、ステップS401において、機密保持領域が存在しないと判断した場合(図中ステップS401における”N”)、当該タスク用の機密情報暗号化鍵により退避されたレジスタ情報の復号処理を行い(S404)、実行状態への遷移処理を終了する。
【0092】
この復号処理においても、ステップS402において、機密情報保持領域中でスワップファイルへの退避が行われているかどうかの判定を行っているが、これも休止処理時の場合と同様に、最適化を図るためである。すなわち、上述した通り、スワップファイル上では機密情報保持領域は既に暗号化によって保護されているので安全性は問題ない。
【0093】
また、既にスワップファイル上への退避処理が行われている場合には、当該領域に対するアクセスが比較的長期間行われていなかったこととなり、ここでタスクの実行が再開されたとしても当該領域に対するアクセスが行われるとは限らず、この時点でスワップファイルから実メモリに当該領域を読み込み、それを復号して当該タスクが利用できるように準備したとしても無駄となる可能性が高いのである。
【0094】
実際に当該タスクがスワップファイルに退避させられている当該領域へのアクセスを行った場合には、ページフォールトが発生してオペレーティングシステムにより当該領域の実メモリへの読み込みが行われる。しかも、その処理自体は当然当該タスクを再度休止状態にした上で実施されることになるため、オペレーティングシステムによるスワップファイルから実メモリへのデータの読み込みが終了して改めて当該タスクが実行させられる時点になって再度コンテクストスイッチが発生し、その時点では当該機密情報保持領域はスワップファイルではなく実メモリに存在することとなり、ステップS404において、データの復号が行われることになる。
【0095】
以上の結果、スワップファイル上に退避された機密情報保持領域の処置という例外的な事象も、特別扱いすることもなくきわめて自然に処理できることになるのである。
【0096】
[第2実施形態]
次いで、本発明の第5の実施形態について説明する。図8は、本実施形態に係るシステムの構成を示すブロック図である。本実施形態では、複数CPUのSMPシステムに本発明を適用することを前提とする。すなわち、SMPシステムでは、複数のタスクが実際に同時並列的に実行することになるため、前述した第1実施形態における機能に加えて、機密情報保持領域に対して同時に動く他のタスクからのアクセスを禁止する機構を備えることを特徴とする。
【0097】
なお、図8では、実際にタスク3とタスク4が同時に動いている状態を示している。この状態にあっては、機密情報保持領域205と206は復号されて平文状態であることから、本実施形態では、それぞれ他タスクからのアクセスが行えないようにアクセスを規制する。
【0098】
具体的には、図9に示すように、このsallocシステムコールは、引数で与えられるサイズの連続したメモリ領域を新たにタスクのメモリ空間に割り付け(S501)、この割付けが成功したかを判断し(S502)、成功した場合には(図中ステップS502における”Y”)、その部分が機密情報保持領域に関する情報(先頭アドレス及びサイズ)をカーネルメモリ空間中に記録する(S504)。ステップS502において、割付けが成功しなかった場合(図中ステップS502における”N”)、NULL値を返却し(S503)、ステップS504以降の処理は実行しない。
【0099】
ステップS504の後、実行環境がSMPシステムであるかどうかを判定し(S505)、SMPである場合(図中ステップS506における”Y”)には、割り当てた領域に対して、当該タスクが専有的に利用するような指定を行う(S506)。なお、このステップS506において、このような指定がハードウェア的なメモリ管理機構を用いて実現できる場合には、機密情報保持領域の割り当てを同メモリ管理機構が扱うページ単位とする。
【0100】
一方、ステップS505において、実行環境がSMPシステムでないと判断した場合(図中ステップS505における”N”)、或いは、ステップS506の後、確保されたアドレス空間の次の領域のアドレスを返却する(S507)。
【0101】
このような本実施形態に係るマルチタスク実行システムによれば、複数のCPUを搭載するいわゆるSMP(Symmetric Multi Processor)構成の計算機において、同時に複数のタスクがそれぞれ別個のCPUを占有することにより、真に同時並列的に実行が行うシステムであっても、あるタスクの実行中に、機密データ保持領域が平文のままという状態で存在するのを回避し、他のタスクからの操作により、当該領域が漏出するのを防止することができる。
【0102】
すなわち、本実施形態では、他のタスクによって機密データが漏出するのを防止するために、SMP構成の計算機で用いる場合には、単にコンテクストスイッチ時に暗号化/復号化を行うだけではなく、実行中の機密情報を保持するメモリ領域が他のタスクからアクセスできないように制限することができる。
【0103】
具体的には、メモリ領域に対して特定のタスクのみからしか参照できないという属性の付与するとともに、機密情報保持用メモリ領域には同属性を付与する、といった機能をSMP対応オペレーティングシステムカーネルに追加する。
【0104】
なお、メモリデータにも一般的なファイルと同じく書き込み権限、読み出し権限、実行権限等の各種属性が存在し、そういった属性をサポートするために通常オペレーティングシステムにはあるメモリ領域がどのような属性を持っているのかを管理する機能が備えられていることから、既存のオペレーティングシステムの構成を大幅に変更することなく、上記属性を追加することは可能である。
【0105】
【発明の効果】
以上述べたように、この発明によれば、プログラマによって指定される機密情報保持領域を、当該プログラムが実行されているタスク以外のタスクからは読み出すことができないよう保護することが可能となり、機密情報を保持しながら実行するタスクをマルチタスク環境下で安全に実行させることができる。
【0106】
また、本発明によれば、保護機構は管理者権限を備えた悪意あるタスクに対してもアクセス制限を行うことができるため、管理者権限の漏洩や盗用という攻撃にも耐え得ることができる。
【図面の簡単な説明】
【図1】第1実施形態に係るマルチタスク実行システムの構成を示すブロック図である。
【図2】第1実施形態における起動時の処理を示すフローチャート図である。
【図3】第1実施形態において、適切なメモリ管理ユニットを持つハードウェア構成を備えた例を示す説明図である。
【図4】第1実施形態において、システムコールに応じて新しくタスクを生成するための処理を示す説明図である。
【図5】第1実施形態において、プログラマに対して機密情報保持領域を確保するために提供されるインターフェースの説明図である。
【図6】第1実施形態における、コンテクストスイッチ処理発生時に行われる暗号化処理の概要を示す説明図である。
【図7】第1実施形態における、コンテクストスイッチ処理発生時に行われる復号化処理の概要を示す説明図である。
【図8】第2実施形態に係るシステムの構成を示すブロック図である。
【図9】第2実施形態における、マルチタスク実行システムの動作を示す説明図である。
【符号の説明】
100…ハードウェア
101…マイクロプロセッサ
101a…TLB
102…メモリ
103…暗号処理エンジン
104…システムバス
105…コントローラ
106…増設ボード
107…外部バス
200…メモリ空間
201…暗号化鍵保持用配列
202〜205,208…機密情報保持領域
206…TLB管理領域
209…タスク管理データ
209a…レジスタ退避領域
210…管理データ
210a…レジスタ退避領域
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a security technique in a computer, and relates to a multitask execution system and a multitask execution method capable of executing a plurality of tasks in a pseudo (TSS environment) or actually (SMP environment) simultaneously and in parallel.
[0002]
[Prior art]
In recent years, virtually any computer, from a personal computer (PC) used by an individual to a server computer that provides services such as electronic commerce (EC), and even a supercomputer, provides a multitasking environment.
[0003]
The multitask environment referred to here is an environment in which a plurality of “tasks”, which are units of processing handled by a computer, can be executed at the same time. These tasks are executed by a single central processing unit (CPU). In the computer used, pseudo-parallel execution by TSS (Time Sharing System, time-division type) is executed, and in a computer in which a plurality of CPUs are mounted, SMP (Symmetric Multi Processor) configuration is used to realize truly simultaneous and parallel execution. Has been realized.
[0004]
In such a multi-task environment, how to protect confidential data held by each task from other tasks becomes a problem. This is considered to have a particularly large effect on computers that must handle important information, such as servers used for electronic commerce.
[0005]
For example, when conducting electronic commerce using the Internet, SSL (Secure Sockets Layer, U.S. Pat. No. 5,825,890. Elgamal, et al., "Secure socket layer application program apparel to other countries, 20th edition). It is a common practice to protect the communication between the browser and the web server using a mechanism called.
[0006]
However, in order for this SSL to function safely, it is necessary to install a unique secret key that cannot be known to anyone other than the web server. The server uses the private key to prove its identity to the accessing user, but if this private key becomes known to others,
1. Impersonate the server using the secret key
2. By intercepting the exchange at the start of the communication session of the browser / server encrypted by the public key corresponding to the secret key, decryption of the actual communication encrypted by the common key exchanged there and interception of the content.
Such an attack would be possible.
[0007]
In order to avoid such a danger, conventionally, the secret key is generally operated in such a manner that it is subjected to an encryption process and stored in a file or the like. This ensures the security of the secret key in a state where it is stored on the disk, within the range of the strength of the encryption technology used for protection. However, when the web server program is executed, the secret key is protected. Is read from a file, decrypted, and stored as plain text (non-encrypted text) in a memory reserved for the application program.
[0008]
At this time, if another task simultaneously executed on the same server computer can access the memory area storing the secret key information and read out the data in the plaintext state, the secret key of the web server can be easily known. Therefore, the above-mentioned attack can be performed. Thus, protecting the memory holding confidential information from other concurrently executed tasks is particularly important in modern computing environments where multitasking is common.
[0009]
In many operating systems that support a multitasking environment, one task is allocated by allocating a virtual memory space for each task and managing the mapping between the virtual memory area and the physical memory area accessed by each task. Care is taken that data on the held memory cannot be accessed by other tasks.
[0010]
However, in practice, a function is provided to connect a debugger to the running task when the running task needs to be debugged, and to monitor the memory area and execution state of the task. However, since the monitoring function can be used for scrutiny or so-called hacking, the above-mentioned protection by the operating system is not perfect. In particular, when there is a malicious user having the administrator authority of the computer, the secret information can be read using the monitoring function.
[0011]
Note that the “user having administrator authority” here is not always an authorized computer administrator. A major threat to computer environments in recent years is the use of commands called "shells" that exploit security holes in the program code of tasks that are required to be executed under administrator privileges. An attacker who gains such a shell, running under administrative privileges, is able to perform virtually any operation as an administrator. Such operations include, in addition to the scrutiny of running tasks by the debugger described earlier,
-Writing all information existing in the task memory space to a file
・ Scrutiny of the task memory saved in the secondary storage area of the hard disk etc. called the swap file due to the exhaustion of the real memory capacity
Such attacks are conceivable.
[0012]
Various schemes have been devised for providing protection of communication data using encryption technology such as the above-mentioned SSL, but all of them are designed so that tasks are executed in a form in which a secret key is read into a memory. Therefore, it is known that when an attack is made not on the network but on the computer itself, which is the execution environment, all of them have large vulnerabilities.
[0013]
As conventional techniques for solving such a problem, roughly two types of solutions have been devised. One is a software-based solution of subdividing administrator authority, and the other is a method of physically / logically isolating confidential information.
[0014]
As a technology belonging to the former, an operating system known as a so-called "trusted OS" corresponds. These operating systems basically employ a strategy of minimizing the execution of tasks with absolute authority by subdividing the administrative authority. In addition, by using a function called an access control list, access management for data such as files can be set in more detail than in conventional operating systems, and information on other tasks in which a certain task is executed in parallel It is designed to be very difficult to access.
[0015]
The policy of strengthening protection by refining the authority and access management methods employed by this type of trusted OS can be basically realized only by the operating system software, and therefore does not require special hardware and is relatively low. There is an advantage that the cost is sufficient. On the other hand, even though the protection function of the operating system is isolated from other tasks, the data in the task memory is kept in plain text, so a means for an attacker to access the data in the memory has been developed. If so, confidential information may be leaked.
[0016]
On the other hand, for the latter measure,
a) Isolation by physically separating the part handling confidential information from the computer
b) Protection by encrypting data containing sensitive information in such a way that only a single task can decrypt it.
There are two directions.
[0017]
a) is a so-called "tamper-resistant device", that is, an apparatus in which it is difficult to read data held therein, in which confidential data is held to eliminate interference from others. . Since a tamper-resistant device is generally provided with a unique arithmetic processing unit in addition to a data storage area, it is possible to process confidential information without leaking it to the outside.
[0018]
Examples of the use of such tamper-resistant devices to protect confidential information include smart cards for protecting private confidential information and secrets of certificate authorities that issue digital certificates using public key cryptography. There is an HSM (Hardware Security Module) mainly used for protecting keys. Some hardware products such as SSL accelerators whose main purpose is to speed up cryptographic processing are configured so that confidential information such as a secret key cannot be read from the outside. Such a product can also be regarded as a measure corresponding to this a).
[0019]
However, the countermeasure using such a tamper-resistant device has a drawback of essentially lacking flexibility. Most tamper-resistant devices only have a specific function, for example, "decrypt encrypted data given as input with a secret key", which protects confidential information in other ways than the device supports It will be difficult to do.
[0020]
Some tamper-resistant devices can be expanded in function by installing an arbitrary application in the form of a Java (registered trademark) applet or the like. Then, it becomes difficult to guarantee that the installed application itself is not malicious such as a virus.
[0021]
In addition, it is important for most confidential information not to know the value itself, and it is also necessary to prevent situations in which processing using the confidential information is actually performed by anyone other than the authorized person . This is because for an attacker, there is almost no difference between knowing the secret key itself and electronically signing arbitrary data using the secret key. Even though the possibility that the confidential information itself is known to others by the tamper-resistant device is reduced, an operation using the confidential information based on an instruction from an unauthorized person of the device (for example, encryption using a secret key). If the result is returned and the result is returned, the intended purpose will not be achieved.
[0022]
In general, access to external devices such as tamper-resistant devices connected to a computer will be managed by the operating system, but if the access management function is compromised, unauthorized users in a multitasking environment The abuse of the tamper resistant device cannot be ruled out.
[0023]
On the other hand, the above-mentioned b) is to avoid the interference by other tasks by encrypting the data existing in the memory of the task. In this method, the data stored in the memory is encrypted in such a way that it can be decrypted only by the task, so that even if another task accesses the memory of the task, the data is converted into encrypted data that cannot be decrypted. Since only the recognition is performed, it is possible to provide stronger protection for the confidential data than the measure a).
[0024]
For example, U.S. Pat. No. 5,224,166 (Hartman, Jr., "System for sealing processing of encrypted and non-encrypted data and instructions", Jun. 29, 93 in external memory, and June in U.S. Pat. No. 5,224,166). The area / code area is stored in an encrypted form, and the data / code is decrypted when read into a cache area located in a physically secure area in the central processing unit, so that the data / code can be saved from other tasks. Systems for eliminating unauthorized access have been proposed.
[0025]
A key for decrypting the encrypted data is also placed in a physically secure area and managed so that unauthorized use is impossible. In this system, the decrypted plaintext data is stored only in the cache area located in the physically secure area, and is automatically encrypted when they are written back to the memory by the cache write back of the CPU. Confidentiality is ensured.
[0026]
Another prior art Japanese patent, Japanese Patent Application Laid-Open No. 2001-318787 (Mikio Hashimoto et al., "Microprocessor, Multitask Execution Method and Multithread Execution Method Using It," May 8, 2000. In Japanese Patent Application Laid-Open No. H10-163, in addition to performing decryption processing / encryption processing when data in a memory is read to a cache or writing data in the reverse direction, the same is performed when an operating system function called context switching is performed. A system has been proposed in which the unique information of a task such as a register is also encrypted to prevent the above-mentioned attack using a debugger or the like.
[0027]
[Patent Document 1]
U.S. Pat. No. 5,224,166
[0028]
[Patent Document 2]
JP 2001-318787 A
[0029]
[Problems to be solved by the invention]
The above two prior arts basically include a hardware module for encrypting / decrypting data or code as an additional function to the microprocessor inside the processor (between the cache in the processor and the system bus). It is to implement.
[0030]
In these conventional techniques, since the technique of expanding the microprocessor in hardware can obtain the maximum performance benefit, all of the data area and the code area that are placed in the memory as in these conventional techniques are reduced. It is considered optimal to realize a system that encrypts and decrypts / re-encrypts them in real time in the course of execution.
[0031]
However, modern state-of-the-art microprocessors are an accumulation of advanced R & D capabilities and technical know-how, and the addition of new hardware into such existing microprocessor systems has created Is not practical.
[0032]
Also, the mechanism of dynamically performing decryption / encryption processing at the timing of reading or writing all data from the memory to the cache may have a significant adverse effect on execution performance. For example, with the latest technology for memory access, the maximum performance of several GB / sec can be obtained, but since the encryption processing performance by hardware is at most the Gb / sec level, pure memory access performance alone is 1/10 It may fall below.
[0033]
In recent microprocessors, there is a great demand for basically providing a faster processor at a lower cost. Therefore, it can be said that addition of a function having a negative effect on such performance is not appropriate. For this reason, it is desired that the mechanism of security protection in a multitask environment is realized separately from the function of the microprocessor itself.
[0034]
Therefore, the present invention has been made in view of the above points, and in a modern computer operating system that supports a multitasking environment, a plurality of tasks that are executed in parallel in parallel execute important information from other tasks. It is an object of the present invention to provide a multitask execution system and a multitask execution method that can realize an environment that can be executed without being read.
[0035]
[Means for Solving the Problems]
In order to solve the above-described problems, the present invention is a multitask execution system that sequentially executes a plurality of tasks by a single CPU and virtually processes the plurality of tasks, and is associated with each task. A confidential information storage area, an encryption key storage area that is set uniquely for each confidential information storage area and stores key information for encrypting each confidential information storage area, and is stopped when a task is switched by the operating system An encryption processing unit is provided for encrypting a confidential information holding area associated with a task with key information when the task is switched.
[0036]
Further, the present invention is a multitask execution system that processes a plurality of tasks in parallel by a plurality of CPUs, wherein a confidential information holding area associated with each task, and a confidential information holding area uniquely set for each confidential information holding area. An encryption key storage area for storing key information for encrypting the confidential information storage area, and a confidential information storage area associated with a task that is stopped when a task is switched by the operating system. And an access control unit that sets an access right for each confidential information holding area and restricts access to the confidential information holding area.
[0037]
In the above invention, it is preferable that the confidential information holding area encrypted by the encryption processing unit is provided with a decryption processing unit that decrypts the confidential information holding area with the key information when the task is switched. Note that the encryption processing unit and the decryption processing unit may be hardware provided separately and independently of the CPU.
[0038]
In the above invention, the key information can be generated at the time of task generation processing or at the time of starting the operating system. In this case, during the process of generating a new task, the information copied from the existing task and stored in the confidential information holding area shared by the new task and the existing task, It is preferable to generate key information independent of the key information associated with the task.
[0039]
In the above invention, encryption and decryption processing of the confidential information is performed at the timing when the context switch is executed, based on the operation of the kernel of the operating system that performs the task switching, that is, the context switch. More specifically, in the context switch processing that occurs when the CPU usage time allocated to a certain task has expired, or execution has been interrupted due to input / output wait, etc. After all necessary information is stored in an area dedicated to the task, the information of another task that is also stored is loaded into a register and execution is resumed.
[0040]
That is, in the present invention, the kernel is used for context switching,
(1) For a task that is shifted from the execution state to the sleep state, the confidential information held by the task is encrypted with a key dedicated to the task.
(2) Regarding the task that is returned from the hibernation state to the execution state, the confidential information that was encrypted when the task was previously shifted to the hibernation state is decrypted with the task-specific key.
Is performed.
[0041]
Further, according to the present invention, when programming an application program using a system call, data requiring confidentiality and a confidential information holding area for storing the data are explicitly designated, and only the specific area is designated. The concealment process can be performed at a specific timing as needed, not in real time, that is, at the time of task switching. Note that the data concealment processing here may use information concealment technology (Steganography) in addition to those using various encryption technologies as conventionally used.
[0042]
Further, according to the present invention, since it is not necessary to perform real-time concealment processing during the execution of a program, there is no need to add a special mechanism inside the microprocessor, and hardware such as a chipset and an expansion board is added. , Or even only by software, so that existing systems and devices can be effectively used.
[0043]
Further, in the above invention, the storage device includes a save determination unit that determines whether the confidential information in the virtual memory of the task is stored in the secondary storage area such as the swap file, and the storage is not performed by the encryption processing unit. In such a case, it is preferable to execute an encryption process.
[0044]
In this case, the data saved in the swap file on the secondary storage can be inspected to avoid the possibility that important confidential data existing on the task memory is hacked. That is, in a multitask execution environment in which a plurality of tasks are executed virtually simultaneously in parallel, when one task is being executed, all other tasks are in a stopped state and are required to continue execution. Even in a system that saves information, it is possible to scrutinize the internal state of a task being executed by a debugger, analyze the saved information, and avoid leakage of confidential information.
[0045]
Further, according to the present invention, it is possible to protect data that needs to be saved without requiring encryption processing at the time of writing to the swap file. More specifically, the process of writing memory data to the swap file occurs when a memory request from a task being executed cannot be satisfied, and this writing process is performed by a kernel function. When the kernel operates, all normal user tasks are in a dormant state. Therefore, in the case of a system to which the present invention is applied, the confidential information held by those tasks is already in an encrypted state, and is stored in a memory. Even if any data existing in the file is written to the swap file and the contents of the swap file are scrutinized by an attacker, it is possible to prevent leakage of confidential information. .
[0046]
Further, according to the present invention, in a computer having a so-called SMP (Symmetric Multi Processor) configuration in which a plurality of CPUs are mounted, a plurality of tasks simultaneously occupy separate CPUs, respectively, so that execution is performed in a truly simultaneous and parallel manner. Even in a system, it is possible to prevent a confidential data storage area from being left in plaintext while a certain task is being executed, and prevent the area from being leaked by an operation from another task. it can.
[0047]
That is, in the present invention, in order to prevent confidential data from leaking out due to other tasks, when used in a computer having an SMP configuration, not only encryption / decryption at the time of context switching but also It is possible to restrict the memory area holding the confidential information from being accessed by other tasks.
[0048]
More specifically, a function is added to the SMP-compatible operating system kernel such that an attribute that only a specific task can refer to the memory area and the same attribute is added to the confidential information holding memory area are added to the memory area. .
[0049]
Note that memory data also has various attributes such as write authority, read authority, and execute authority, similar to general files. To support the setting of these attributes, the operating system usually has a certain memory area. Since there is provided a function of managing whether the attribute has a certain attribute, it is possible to add the attribute without significantly changing the configuration of the existing operating system.
[0050]
BEST MODE FOR CARRYING OUT THE INVENTION
[First Embodiment]
A first embodiment of the present invention will be described. FIG. 1 is a block diagram illustrating a case where the multitask execution system of the present invention is applied to a single CPU system.
[0051]
As shown in FIG. 1, the information concealment system according to the present embodiment includes hardware 100 and a memory space 200. The hardware 100 is configured such that a microprocessor 101, a memory 102, and a cryptographic processing engine 103 are connected by a system bus 104.
[0052]
Note that the cryptographic processing engine 103 includes a memory 102 such as an expansion board 106 mounted on an external bus 107 connected to the outside of the hardware 100 via an I / O controller 105 such as a PCI instead of the system bus 104. A device capable of performing DMA transfer between them can be employed. Further, as the cryptographic processing engine 103, like the above-described 103 and 106, the operating system itself may perform the cryptographic processing by software without using hardware. That is, in the multitask execution system according to the present embodiment, it is possible to ensure the flexibility that information concealment can be performed without being bound by a specific hardware form.
[0053]
The memory space 200 is a virtual memory area secured by an operating system operating on the hardware 100, and is provided in confidential information holding areas 202 to 204 associated with each task and in an operating system kernel memory. And an encryption key holding array 201 for holding keys associated with the confidential information holding areas 202 to 204.
[0054]
The confidential information holding areas 202 to 204 are encrypted by a key corresponding to the task being executed, when the task being executed is shifted to the sleep state by the operating system kernel, and the task in the sleep state is shifted to the execution state. In this case, the storage area is decrypted by a key corresponding to the task.
[0055]
The encryption key holding array 201 holds an encryption key having an element number equal to the maximum number of tasks supported by the operating system (for example, 65536 in the case of a general UNIX (registered trademark) operating system). The encryption key holding array 201 has an access right set so that it can be accessed only from the operating system kernel. This access right will be described later.
[0056]
The individual keys held in the encryption key holding array 201 are used to process the confidential information holding areas 202 to 204 specified at the time of programming in the memory of the task having the corresponding task number. Specifically, when a running task is transitioned to the hibernate state by the operating system kernel, the confidential information holding area (202, 203, 204, etc.) associated with the task is changed by the key corresponding to the task. Encrypted.
[0057]
Conversely, for a task that is transitioned from the sleep state to the execution state, execution of the task is resumed after decrypting the encrypted confidential information holding area 205 with the key corresponding to the task during the sleep processing of the task. become.
[0058]
FIG. 2 is a flowchart illustrating processing required at the time of starting the operating system in the present embodiment. Here, a process performed by the 4.4 BSD operating system will be described as a specific example. However, the present invention is not limited to this, and it is possible to use an operating system of another system.
[0059]
As shown in the figure, when the operating system is started, a small program called a boot program is first started (S101), and the operating system is loaded on the memory by the boot program. Next, a startup routine written in assembly language, such as identification of the type of CPU and inspection of the capacity of mounted memory, is executed (S102), and preparation for execution of the main part of the operating system written in C language is performed.
[0060]
After that, various types of system data used by the operating system are prepared by an initialization process depending on the type of machine to be executed (S103). As a result, the memory occupied by the encryption key holding array 201 for holding encryption keys is prepared. The area will be allocated in this part. Thereafter, an initialization process independent of the model is performed (S104).
[0061]
Here, a case where the memory management unit of the microprocessor 101 on which the operating system is executed has an appropriate function (for example, MIPS described later) will be described.
[0062]
In the present embodiment, the encryption key holding array 201 has a function of setting the area to be readable and writable only while the part related to holding the confidential information in the kernel is being executed. Even if the task is performed, it is restricted so that the area cannot be accessed.
[0063]
Thus, confidential information can be retained even in an environment in which the operating system has an interface that allows access to the physical memory for the purpose of debugging or the like. For example, in the 4BSD, an interface for reading / writing physical memory in a file system under the name of / dev / mem is provided. If the user task has administrator authority, the interface is used to hold an encryption key. Even in a case where the array portion can be read, as in the present embodiment, by restricting reading and writing to the encryption key holding array 201, it is possible to prevent leakage of confidential information.
[0064]
As an example of hardware having an appropriate memory management unit described above, there is MIPS as one of microprocessors as shown in FIG.
[0065]
That is, as shown in the figure, in the MIPS architecture, a virtual address and a physical address are associated by a TLB (Translation Look-aside Buffer) 101a which is hardware existing in the microprocessor 101. At the time of this association, a decision as to which virtual address is mapped to which physical address is made by the operating system kernel.
[0066]
In the present embodiment, in order to manage such a mapping, the operating system kernel secures and maintains the TLB management area 206 in a memory managed by the operating system kernel. When the present embodiment is used on such hardware, in the TLB management area 206 and the TLB 101a in the microprocessor, the encryption key holding function for holding the encryption key except during the execution of the secret information holding process is performed. It is set so that the array 201 cannot be accessed. In the case of the MIPS architecture in the present embodiment, this can be realized by turning off the Valid (V) bit of the TLB entry corresponding to the page.
[0067]
In the present embodiment, the architecture of the MIPS microprocessor has been described as a specific example. However, the present invention is not intended only for such an individual microprocessor, and is applicable to existing and future microprocessors in general. Applicable.
[0068]
In general, the mapping between the virtual address and the physical address is performed in units of pages supported by the memory management unit. Therefore, when such hardware-based access management is applied, the encryption key holding array 201 is in page units. Secure.
[0069]
In the present embodiment, when the operating system is started, only the area corresponding to the encryption key holding array 201 is secured and the access right is set, and the actual generation of the encryption key is performed by task generation processing. Is delayed until
[0070]
As a result, maximum security can be ensured by delaying the generation of the encryption key, which is important confidential information, until it is really needed, and the task number is data that can be reused. By limiting the lifetime of the key to one task, it is possible to reduce the possibility of leakage of confidential information due to using the same key for a long time. In an environment where it is not necessary to consider reusing the task number, a key required when the operating system is started may be generated.
[0071]
Next, an encryption key generation process at the time of the task generation process will be described. Here, a task is generated according to a system call. FIG. 4 shows a process for generating a new task.
[0072]
In the present embodiment, a UNIX (registered trademark) operating system including 4.4 BSD is premised, and the task generation in this UNIX (registered trademark) operating system is realized by executing a fork system call. The fork system call allocates management data for a newly created task in the operating system, and secures a complete copy of the virtual memory space of the task that executed the system call as a memory space for the new task. Builds a new task execution environment.
[0073]
In this embodiment, the copy of the memory space is secured by using a technique known as copy-on-write until a new task copied from the old task writes data to the memory area. Is not executed. In general, a new task created by the fork system call will load this new program code, which is different from the one that was previously executing, and start execution from scratch, thus enabling this copy-on-write mechanism. Can be performed.
[0074]
FIG. 4 shows a state in which task y is newly generated as a result of calling the fork system call while task x is executing. As shown in the figure, in this state, the management data 210 for the task y is newly generated, and the management data 210 stores the confidential information holding area 208 of the task x management data 209 which is the caller of the fork system call. Shared by copy-on-write type reference.
[0075]
In addition to such a task-related data structure, the encryption key holding array 201 in the operating system kernel memory includes an element position corresponding to a new task number y for protecting confidential information in the memory of the task y. Set a new key. This key is a different value that is independent of the key for the task x, and is generated as safe pseudo-random data in the fork system call process.
[0076]
As a result, the confidential information holding area 208 is shared by both the tasks x and y, but the key that can correctly decrypt the area is only the key of the task x that generated the area. The task y generated as a result cannot know the contents of the information. As described above, even between tasks having a parent-child relationship, the confidential information is regulated so that only the task that generated the information can be accessed.
[0077]
In the task management data 209 and 210, register save areas 209a and 210a for saving values stored in various registers which are a part of hardware resources at the time of context switching are secured as part of the task execution context. Have been.
[0078]
Since there is a possibility that some or all of the confidential information may be stored in these registers when the context switching process occurs, the task save area 209a or 210a in the task management data is similarly dedicated to the task. Encrypt with an encryption key. In this case, with respect to the register save area 210a of the new task y, after copying the register save area of the task x, the area is decrypted with the key of the task x, and further, the process of encrypting with the key of the task y is performed.
[0079]
Furthermore, in the present embodiment, an interface provided for securing a confidential information holding area for a programmer is provided. FIG. 5 is an explanatory diagram of an interface provided for a programmer to secure a confidential information holding area.
[0080]
This function is basically realized by a salloc system call having an interface equivalent to the library function malloc () that provides dynamic memory area allocation in the C language.
[0081]
That is, as shown in FIG. 5, the salloc system call newly allocates a continuous memory area of the size given by the argument to the memory space of the task (S201), and determines whether or not the allocation is successful (S202). If it succeeds ("Y" in step S202 in the figure), the information (head address and size) relating to the confidential information holding area is recorded in the kernel memory space (S204). Thereafter, the address of the next area in the secured address space is returned (S205). If the allocation is not successful in step S202 ("N" in step S202 in the figure), a NULL value is returned (S203), and the processing after step S204 is not executed.
[0082]
The process of performing encryption and decryption on the memory space secured in this manner is performed according to the following procedure. FIG. 6 and FIG. 7 are explanatory diagrams showing the outline of the encryption and decryption processing performed when the context switch processing occurs.
[0083]
First, in the case of performing encryption, as shown in FIG. 6, regarding a task whose execution is interrupted by the context switch processing and transitioned to the hibernate state, the register information saved by the secret information encryption key for the task is used. After the encryption (S301), it is determined whether or not the confidential information storage area of the task exists (S302). If the confidential information storage area exists ("Y" in step S302 in the figure), the process proceeds to step S301. It is determined whether or not the existing confidentiality area is saved in the swap file (S304). If it is determined in step S302 that there is no confidentiality area ("N" in step S302 in the figure), the process ends (S303).
[0084]
If it is determined in step S304 that there is an area that has not been saved (“N” in step S304 in the figure), the area is encrypted using a secret information encryption key (S305). On the other hand, if it is determined in step S304 that the area is saved in the swap file (“Y” in step S304 in the figure), the process returns to step S302, and the same processing as above is repeated.
[0085]
The reason why it is determined in step S304 whether or not the data is saved in the swap file is for optimization. That is, by making such a determination, it is possible to prevent the entire confidential information holding area from being uniformly encrypted, and to temporarily read the information saved in the swap file into the real memory before performing the encryption processing. The heavy processing of performing is unnecessary.
[0086]
In the present embodiment, since the process of saving the data portion to the swap file can be performed only by the kernel, the swap save process is not performed in the context where the task is being executed. After the task has been put into a suspended state, swap evacuation processing is executed.
[0087]
Therefore, in the present embodiment, the protection of the confidential information holding area by encryption is performed at the time when the swap save processing is executed, and the confidential information holding area is already secure at the time of saving to the swap file. In the state, the confidential information storage area saved in the swap file does not require the confidentiality processing when the task is suspended.
[0088]
Next, a decoding process related to a task that is shifted from the sleep state to the execution state will be described.
[0089]
As shown in FIG. 7, first, it is determined whether or not a confidential area exists (S401). If it is determined that a confidential area exists ("Y" in step S401 in FIG. 7), the area is determined. It is determined whether or not is saved in the swap file (S402). If it is determined in step S402 that the area that needs to be saved has been saved to the swap file, the process returns to step S401, and the processing from step 401 onward is repeated.
[0090]
In this step S402, when it is determined that there is an area that has not been saved in the swap file ("N" in step S402 in the figure), of the confidential information holding area of the task, from the start address, the size of the area, Decryption is performed using the secret information encryption key (S403).
[0091]
On the other hand, if it is determined in step S401 that there is no confidentiality storage area ("N" in step S401 in the figure), the register information saved by the confidential information encryption key for the task is decrypted (S404). Then, the transition process to the execution state ends.
[0092]
Also in this decryption process, in step S402, it is determined whether the evacuation to the swap file has been performed in the confidential information holding area, but this is also optimized as in the pause process. That's why. That is, as described above, since the confidential information holding area is already protected by encryption on the swap file, there is no problem in security.
[0093]
If the evacuation process has already been performed on the swap file, it means that access to the area has not been performed for a relatively long time, and even if task execution is resumed here, Access is not necessarily performed, and even if the area is read from the swap file to the real memory at this point, and it is decoded and prepared so that the task can be used, there is a high possibility that it will be useless.
[0094]
When the task actually accesses the area saved in the swap file, a page fault occurs and the operating system reads the area into the real memory. Moreover, since the process itself is performed after the task is put into a hibernation state again, when the data is read from the swap file into the real memory by the operating system and the task is executed again. Then, a context switch occurs again. At that time, the confidential information holding area exists not in the swap file but in the real memory, and the data is decrypted in step S404.
[0095]
As a result, the exceptional event of processing the confidential information storage area saved on the swap file can be handled very naturally without special treatment.
[0096]
[Second embodiment]
Next, a fifth embodiment of the present invention will be described. FIG. 8 is a block diagram illustrating the configuration of the system according to the present embodiment. In the present embodiment, it is assumed that the present invention is applied to an SMP system having a plurality of CPUs. That is, in the SMP system, a plurality of tasks are actually executed in parallel, and therefore, in addition to the functions in the first embodiment described above, in addition to the functions in the confidential information holding area, access from other tasks that are simultaneously operated to the confidential information holding area is performed. And a mechanism for prohibiting the operation.
[0097]
FIG. 8 shows a state in which task 3 and task 4 are actually running at the same time. In this state, the confidential information holding areas 205 and 206 are decrypted and are in a plaintext state. Therefore, in this embodiment, access is restricted so that access from other tasks cannot be performed.
[0098]
Specifically, as shown in FIG. 9, the salloc system call allocates a continuous memory area of a size given by an argument to a new task memory space (S501), and determines whether or not the allocation has succeeded. (S502) If successful ("Y" in step S502 in the figure), the information (head address and size) relating to the confidential information holding area is recorded in the kernel memory space (S504). If the allocation is not successful in step S502 ("N" in step S502 in the figure), a NULL value is returned (S503), and the processing after step S504 is not executed.
[0099]
After step S504, it is determined whether the execution environment is an SMP system (S505). If the execution environment is SMP (“Y” in step S506 in the figure), the task is exclusively used for the allocated area. Is specified (S506). In the case where such a designation can be realized by using a hardware-based memory management mechanism in step S506, the allocation of the confidential information holding area is performed in page units handled by the memory management mechanism.
[0100]
On the other hand, if it is determined in step S505 that the execution environment is not an SMP system ("N" in step S505 in the figure), or after step S506, the address of the next area in the secured address space is returned (S507). ).
[0101]
According to the multitask execution system according to the present embodiment, in a computer having a so-called SMP (Symmetric Multi Processor) configuration in which a plurality of CPUs are mounted, a plurality of tasks simultaneously occupy separate CPUs. Even in a system that executes concurrently and in parallel, during the execution of a certain task, the confidential data holding area is prevented from existing in a plain text state, and the Leakage can be prevented.
[0102]
That is, in the present embodiment, in order to prevent leakage of confidential data by another task, when used in a computer having an SMP configuration, not only encryption / decryption at the time of context switch but also Can be restricted so that the memory area holding the confidential information cannot be accessed from other tasks.
[0103]
More specifically, a function is added to the SMP-compatible operating system kernel such that an attribute that only a specific task can refer to the memory area and the same attribute is added to the confidential information holding memory area are added to the memory area. .
[0104]
Note that memory data has various attributes such as write authority, read authority, and execute authority, similar to general files, and what attributes a certain memory area usually has in an operating system to support such attributes. Since the function of managing whether or not the operating system is provided is provided, it is possible to add the above attribute without significantly changing the configuration of the existing operating system.
[0105]
【The invention's effect】
As described above, according to the present invention, it is possible to protect a confidential information holding area designated by a programmer so that the confidential information holding area cannot be read from a task other than the task in which the program is being executed. Can be safely executed in a multitasking environment while maintaining tasks.
[0106]
Further, according to the present invention, since the protection mechanism can restrict access to a malicious task having administrator authority, it can withstand attacks such as leakage or plagiarism of administrator authority.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of a multitask execution system according to a first embodiment.
FIG. 2 is a flowchart illustrating a startup process according to the first embodiment;
FIG. 3 is an explanatory diagram showing an example including a hardware configuration having an appropriate memory management unit in the first embodiment.
FIG. 4 is an explanatory diagram showing a process for generating a new task in response to a system call in the first embodiment.
FIG. 5 is an explanatory diagram of an interface provided to secure a confidential information holding area for a programmer in the first embodiment.
FIG. 6 is an explanatory diagram illustrating an outline of an encryption process performed when a context switch process occurs in the first embodiment.
FIG. 7 is an explanatory diagram illustrating an outline of a decoding process performed when a context switch process occurs in the first embodiment.
FIG. 8 is a block diagram illustrating a configuration of a system according to a second embodiment.
FIG. 9 is an explanatory diagram illustrating an operation of the multitask execution system according to the second embodiment.
[Explanation of symbols]
100 ... hardware
101 ... Microprocessor
101a ... TLB
102 ... Memory
103 ... Cryptographic processing engine
104: System bus
105 ... Controller
106 ... Extension board
107 ... External bus
200 ... memory space
201: Encryption key holding array
202 to 205, 208: Confidential information holding area
206: TLB management area
209: Task management data
209a: Register save area
210: Management data
210a: Register save area

Claims (14)

単一のCPUによって複数のタスクを順次実行し、該複数のタスクを仮想的に並列処理するマルチタスク実行システムであって、
各タスク毎に対応付けられる機密情報保持領域と、
前記各機密情報保持領域に固有に設定され、各機密情報保持領域を暗号化するための鍵情報を格納する暗号化鍵記憶領域と、
オペレーティングシステムによるタスク切り替え時に停止状態となるタスクに関連付けられた機密情報保持領域を、当該タスク切り替え時に、前記鍵情報により暗号化する暗号処理部と
を備えることを特徴とするマルチタスク実行システム。
A multi-task execution system that sequentially executes a plurality of tasks by a single CPU and virtually processes the plurality of tasks in parallel,
A confidential information storage area associated with each task;
An encryption key storage area that is set uniquely for each confidential information holding area and stores key information for encrypting each confidential information holding area;
A multitask execution system, comprising: a cryptographic processing unit that encrypts a confidential information holding area associated with a task that is stopped when a task is switched by an operating system with the key information when the task is switched.
複数のCPUにより複数のタスクを並列処理するマルチタスク実行システムであって、
各タスク毎に対応付けられる機密情報保持領域と、
前記各機密情報保持領域に固有に設定され、各機密情報保持領域を暗号化するための鍵情報を格納する暗号化鍵記憶領域と、
オペレーティングシステムによるタスク切り替え時に停止状態となるタスクに関連付けられた機密情報保持領域を、当該タスク切り替え時に、前記鍵情報により暗号化する暗号処理部と、
前記機密情報保持領域毎にアクセス権を設定し、該機密情報保持領域に対するアクセス制限を行うアクセス制御部と
を備えることを特徴とするマルチタスク実行システム。
A multi-task execution system that processes a plurality of tasks in parallel by a plurality of CPUs,
A confidential information storage area associated with each task;
An encryption key storage area that is set uniquely for each confidential information holding area and stores key information for encrypting each confidential information holding area;
An encryption processing unit that encrypts a confidential information holding area associated with a task that is in a suspended state when a task is switched by an operating system with the key information when the task is switched,
An access control unit for setting an access right for each confidential information holding area and restricting access to the confidential information holding area.
前記暗号処理部は、前記CPUとは別途独立に設けられたハードウェアであることを特徴とする請求項1又は2に記載のマルチタスク実行システム。The multitask execution system according to claim 1, wherein the encryption processing unit is hardware provided separately and independently of the CPU. 前記暗号処理部により暗号化された機密情報保持領域を、タスク切り替え時に、前記鍵情報により復号する復号処理部を有することを特徴とする請求項1又は2に記載のマルチタスク実行システム。3. The multitask execution system according to claim 1, further comprising a decryption processing unit that decrypts the confidential information holding area encrypted by the encryption processing unit using the key information when switching tasks. 4. 前記復号処理部は、前記CPUとは別途独立に設けられたハードウェアであることを特徴とする請求項4に記載のマルチタスク実行システム。The multitask execution system according to claim 4, wherein the decryption processing unit is hardware provided separately and independently of the CPU. 前記機密情報保持領域に格納されるデータ及び格納先の機密情報保持領域は、前記オペレーティングシステム上で実行されるアプリケーション内で指定されることを特徴とする請求項1又は2に記載のマルチタスク実行システム。3. The multitask execution according to claim 1, wherein the data stored in the confidential information storage area and the confidential information storage area of the storage destination are specified in an application executed on the operating system. 4. system. 前記機密情報保持領域は、仮想アドレスと物理アドレスとをマッピングすることにより確保され、このマッピングに際し、前記暗号化鍵記憶領域に対するアクセス制限を行うマッピング管理部を備えることを特徴とする請求項1又は2に記載のマルチタスク実行システム。2. The confidential information holding area is secured by mapping a virtual address and a physical address, and at the time of this mapping, a mapping management unit that restricts access to the encryption key storage area is provided. 3. The multitask execution system according to 2. 前記鍵情報は、前記タスクの生成処理時に生成されるものであることを特徴とする請求項1又は2に記載のマルチタスク実行システム。The multitask execution system according to claim 1, wherein the key information is generated at a time of the task generation processing. 前記鍵情報は、前記オペレーティングシステムの起動時に生成されるものであることを特徴とする請求項1又は2に記載のマルチタスク実行システム。The multitask execution system according to claim 1, wherein the key information is generated when the operating system is started. 新規なタスクの生成処理時に、既存のタスクから複製され、前記新規なタスクと該既存のタスクとで共有される機密情報保持領域に格納される情報について、当該新規なタスクに対し、前記既存のタスクに対応付けられた鍵情報とは別途独立な鍵情報を生成することを特徴とする請求項1又は2に記載のマルチタスク実行システム。When generating a new task, for information stored in a confidential information holding area that is copied from an existing task and shared between the new task and the existing task, the existing task 3. The multitask execution system according to claim 1, wherein key information independent of key information associated with the task is generated. タスクの仮想メモリ中の機密情報がスワップファイル等の二次記憶領域に保存されたか否かを判断する退避判定手段を備え、
前記暗号処理部は、前記保存が実行されていない場合に、前記暗号化処理を実行することを特徴とする請求項1又は2に記載のマルチタスク実行システム。
Evacuation determination means for determining whether the confidential information in the task's virtual memory has been saved in a secondary storage area such as a swap file,
The multitask execution system according to claim 1, wherein the encryption processing unit executes the encryption processing when the storage is not performed.
単一のCPUによって複数のタスクを順次実行し、該複数のタスクを仮想的に並列処理するマルチタスク実行方法であって、
各タスク毎に対応付けられる機密情報保持領域を確保するステップ(1)と、
前記各機密情報保持領域に固有に設定され、各機密情報保持領域を暗号化するための鍵情報を生成するステップ(2)と、
オペレーティングシステムによるタスク切り替え時に停止状態となるタスクに関連付けられた機密情報保持領域を、当該タスク切り替え時に、前記鍵情報により暗号化するステップ(3)と
を備えることを特徴とするマルチタスク実行方法。
A multi-task execution method of sequentially executing a plurality of tasks by a single CPU and virtually processing the plurality of tasks in parallel,
Step (1) of securing a confidential information holding area associated with each task;
(2) generating key information that is set uniquely for each of the confidential information holding areas and is used to encrypt each of the confidential information holding areas;
And (3) encrypting the confidential information holding area associated with the task that is brought into a halt state at the time of task switching by the operating system with the key information at the time of task switching.
複数のCPUにより複数のタスクを並列処理するマルチタスク実行方法であって、
各タスク毎に対応付けられる機密情報保持領域を確保するステップ(1)と、
前記各機密情報保持領域に固有に設定され、各機密情報保持領域を暗号化するための鍵情報を生成するステップ(2)と、
オペレーティングシステムによるタスク切り替え時に停止状態となるタスクに関連付けられた機密情報保持領域を、当該タスク切り替え時に、前記鍵情報により暗号化するステップ(3)と、
前記機密情報保持領域毎にアクセス権を設定し、該機密情報保持領域に対するアクセス制限を行うステップ(4)と
を備えることを特徴とするマルチタスク実行方法。
A multitask execution method for processing a plurality of tasks in parallel by a plurality of CPUs,
Step (1) of securing a confidential information holding area associated with each task;
(2) generating key information that is set uniquely for each of the confidential information holding areas and is used to encrypt each of the confidential information holding areas;
(3) encrypting a confidential information holding area associated with a task that is in a suspended state when a task is switched by the operating system with the key information when the task is switched;
(4) setting an access right for each confidential information holding area and restricting access to the confidential information holding area.
暗号化された前記機密情報保持領域を、タスク切り替え時に、前記鍵情報により復号するステップをさらに有することを特徴とする請求項12又は13に記載のマルチタスク実行方法。14. The multitask execution method according to claim 12, further comprising a step of decrypting the encrypted confidential information holding area using the key information when switching tasks.
JP2003065685A 2003-03-11 2003-03-11 Multitask execution system and multitask execution method Expired - Fee Related JP4375980B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003065685A JP4375980B2 (en) 2003-03-11 2003-03-11 Multitask execution system and multitask execution method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003065685A JP4375980B2 (en) 2003-03-11 2003-03-11 Multitask execution system and multitask execution method

Publications (2)

Publication Number Publication Date
JP2004272816A true JP2004272816A (en) 2004-09-30
JP4375980B2 JP4375980B2 (en) 2009-12-02

Family

ID=33126642

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003065685A Expired - Fee Related JP4375980B2 (en) 2003-03-11 2003-03-11 Multitask execution system and multitask execution method

Country Status (1)

Country Link
JP (1) JP4375980B2 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009518742A (en) * 2005-12-08 2009-05-07 アギア システムズ インコーポレーテッド Method and apparatus for secure handling of data in a microcontroller
JP2010517424A (en) * 2007-01-26 2010-05-20 マイクロソフト コーポレーション Encryption key container on USB token
JP2010161660A (en) * 2009-01-08 2010-07-22 Sony Corp Information processing apparatus and method, program, and information processing system
WO2011096073A1 (en) * 2010-02-08 2011-08-11 Ogawa Mutsumi Memory management device
JP2012528499A (en) * 2009-05-27 2012-11-12 シーメンス アクチエンゲゼルシヤフト RFID tag authentication method using asymmetric encryption method
JP2014081613A (en) * 2012-10-12 2014-05-08 Electronics And Telecommunications Research Institute Encryption and decryption method for session state information
JP2014098977A (en) * 2012-11-13 2014-05-29 Canon Inc Information processor and the control method thereof, program
JP2019074913A (en) * 2017-10-16 2019-05-16 株式会社日立製作所 Information processing apparatus and data processing method of information processing apparatus
CN113407434A (en) * 2020-03-16 2021-09-17 腾讯科技(深圳)有限公司 Processing method and device for debugging file

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09258977A (en) * 1996-01-17 1997-10-03 Fuji Xerox Co Ltd Information processor with protection function of software
JP2001318787A (en) * 2000-05-08 2001-11-16 Toshiba Corp Microprocessor and multi-task execution method and multi-thread execution method using the same
JP2002140236A (en) * 2000-10-31 2002-05-17 Toshiba Corp Microprocessor and data protecting method
JP2002232417A (en) * 2001-01-31 2002-08-16 Toshiba Corp Microprocessor
JP2003051819A (en) * 2001-08-08 2003-02-21 Toshiba Corp Microprocessor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09258977A (en) * 1996-01-17 1997-10-03 Fuji Xerox Co Ltd Information processor with protection function of software
JP2001318787A (en) * 2000-05-08 2001-11-16 Toshiba Corp Microprocessor and multi-task execution method and multi-thread execution method using the same
JP2002140236A (en) * 2000-10-31 2002-05-17 Toshiba Corp Microprocessor and data protecting method
JP2002232417A (en) * 2001-01-31 2002-08-16 Toshiba Corp Microprocessor
JP2003051819A (en) * 2001-08-08 2003-02-21 Toshiba Corp Microprocessor

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009518742A (en) * 2005-12-08 2009-05-07 アギア システムズ インコーポレーテッド Method and apparatus for secure handling of data in a microcontroller
JP2010517424A (en) * 2007-01-26 2010-05-20 マイクロソフト コーポレーション Encryption key container on USB token
JP2010161660A (en) * 2009-01-08 2010-07-22 Sony Corp Information processing apparatus and method, program, and information processing system
JP4631974B2 (en) * 2009-01-08 2011-02-16 ソニー株式会社 Information processing apparatus, information processing method, program, and information processing system
JP2012528499A (en) * 2009-05-27 2012-11-12 シーメンス アクチエンゲゼルシヤフト RFID tag authentication method using asymmetric encryption method
US8842831B2 (en) 2009-05-27 2014-09-23 Siemens Aktiengesellschaft Authentication of an RFID tag using an asymmetric cryptography method
WO2011096073A1 (en) * 2010-02-08 2011-08-11 Ogawa Mutsumi Memory management device
US8812872B2 (en) 2010-02-08 2014-08-19 Hypertech Co., Ltd. Memory managment method
JP2014081613A (en) * 2012-10-12 2014-05-08 Electronics And Telecommunications Research Institute Encryption and decryption method for session state information
JP2014098977A (en) * 2012-11-13 2014-05-29 Canon Inc Information processor and the control method thereof, program
JP2019074913A (en) * 2017-10-16 2019-05-16 株式会社日立製作所 Information processing apparatus and data processing method of information processing apparatus
CN113407434A (en) * 2020-03-16 2021-09-17 腾讯科技(深圳)有限公司 Processing method and device for debugging file

Also Published As

Publication number Publication date
JP4375980B2 (en) 2009-12-02

Similar Documents

Publication Publication Date Title
US7073059B2 (en) Secure machine platform that interfaces to operating systems and customized control programs
US10095890B2 (en) Secure processor and a program for a secure processor
CN109783188B (en) Cryptographic memory ownership table for secure public cloud
JP5249399B2 (en) Method and apparatus for secure execution using secure memory partition
Jin et al. Architectural support for secure virtualization under a vulnerable hypervisor
US7392415B2 (en) Sleep protection
KR100375158B1 (en) Tamper resistant microprocessor
JP4226760B2 (en) Microprocessor, multitask execution method using the same, and multired execution method
Li et al. A trusted virtual machine in an untrusted management environment
US7721114B2 (en) Method for using shared library in tamper resistant microprocessor
US10095862B2 (en) System for executing code with blind hypervision mechanism
US9756048B2 (en) System and methods for executing encrypted managed programs
US7330970B1 (en) Methods and systems for protecting information in paging operating systems
US20150310231A1 (en) Multi-Core Processor Based Key Protection Method And System
JP2002202720A (en) Method for sharing enciphered data area among processes in a tamper-resistant processor
Guan et al. Building a trustworthy execution environment to defeat exploits from both cyber space and physical space for ARM
Huber et al. Freeze and Crypt: Linux kernel support for main memory encryption
JP4375980B2 (en) Multitask execution system and multitask execution method
Park et al. Libmpk: software abstraction for Intel memory protection keys
Lie et al. Using hypervisors to secure commodity operating systems
Bove Secure Services for Standard RISC-V Architectures
Wang et al. Building a Lightweight Trusted Execution Environment for Arm GPUs
Nakatsuka et al. CTR: Checkpoint, Transfer, and Restore for Secure Enclaves
Hashimoto Overview of Memory Security Technologies
Suciu et al. AppBastion: Protection from Untrusted Apps and OSes on ARM

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050411

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080702

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080805

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081006

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090407

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090702

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20090721

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090811

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090908

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120918

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130918

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees