JP2023020590A - Information processing apparatus and monitoring method - Google Patents
Information processing apparatus and monitoring method Download PDFInfo
- Publication number
- JP2023020590A JP2023020590A JP2021126042A JP2021126042A JP2023020590A JP 2023020590 A JP2023020590 A JP 2023020590A JP 2021126042 A JP2021126042 A JP 2021126042A JP 2021126042 A JP2021126042 A JP 2021126042A JP 2023020590 A JP2023020590 A JP 2023020590A
- Authority
- JP
- Japan
- Prior art keywords
- area
- information processing
- processing apparatus
- program
- monitoring
- 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.)
- Pending
Links
Images
Landscapes
- Hardware Redundancy (AREA)
- Stored Programmes (AREA)
Abstract
Description
本発明は、情報処理装置、及び監視方法に関する。 The present invention relates to an information processing device and a monitoring method.
情報処理装置においては、その不揮発メモリのデータを改ざんした状態で起動される虞がある。このような場合において、改ざんされた不揮発メモリからの起動時に、改ざんを検知して、改ざんされていない不揮発メモリ領域から正常なデータを復旧するシステムが知られている。 The information processing apparatus may be started with the data in its nonvolatile memory being tampered with. In such a case, there is known a system that detects tampering when booting from a tampered non-volatile memory and restores normal data from an untampered non-volatile memory area.
例えば、特許文献1によれば、起動時にブートプログラムのモジュールの改ざんを検知した場合に、改ざんされたモジュールを更新して自動復旧を行っている。また、特許文献2によれば、ソフトウェア更新を監視するOS監視装置を用いて、ソフトウェアの更新時及び動作時において、完全性や健全性を安全かつ効率的に監視している。このようなソフトウェアの改ざん検知、及び自動復旧処理を行う情報処理装置は、起動時に改ざんを検知することで不正なROMデータを使って起動することを防ぎ、正常なROMデータに復旧して起動することができる。
For example, according to
しかしながら、上記従来技術には以下に記載する課題がある。ソフトウェアの改ざんは、動作検証が十分に行われていない盲点(いわゆるソフトウェアの脆弱性)をついて、情報処理装置の提供者が想定していない例外処理等を潜り込ませる等によって行われている場合が多い。このような場合、例外処理を潜り込まされたソフトウェアは、情報処理装置の提供者が想定した動作ができない、或いは動作が完全でない状態になっていると考えられ、使用者にとって不利益を生じさせる虞がある。 However, the conventional technology described above has the following problems. In some cases, software is tampered with by infiltrating exception handling, etc. that is not assumed by the provider of the information processing equipment, taking advantage of blind spots (so-called software vulnerabilities) where operation verification has not been sufficiently conducted. many. In such a case, it is considered that the software in which the exception processing has been inserted cannot operate as expected by the provider of the information processing apparatus, or is in a state where the operation is incomplete, which may cause disadvantages for the user. There is
したがって、上記従来技術では、ソフトウェアモジュールの起動時に各モジュールの署名を検証して改ざんされているかどうかを検知し、改ざんされている場合に当該モジュールを復旧している。しかし、上記従来技術では、モジュール単位での署名により、モジュールが改ざんされたことは検知できるが、改ざんされた箇所を詳細に特定することはできないため、復旧する場合はモジュール単位での復旧となってしまう。そのため、改ざんされていない箇所も復旧せざるを得ないため、モジュールサイズが大きい場合には復旧に時間が掛かってしまうという問題があった。同様に、OS監視装置によってソフトウェアの動作時に改ざんを監視する場合であっても、監視対象ソフトウェアの署名によって改ざんを検知するものであり、復旧する場合は署名されたモジュール単位で復旧する必要があった。 Therefore, in the conventional technology described above, when a software module is activated, the signature of each module is verified to detect whether or not the module has been tampered with, and if the module has been tampered with, the module is restored. However, in the conventional technology described above, although it is possible to detect that a module has been tampered with based on the signature for each module, it is not possible to specify the details of the tampered portion, so restoration is performed in units of modules. end up As a result, there is no choice but to restore a portion that has not been tampered with, so there is a problem that restoration takes a long time if the module size is large. Similarly, even if the OS monitoring device monitors tampering during software operation, tampering is detected by the signature of the software to be monitored, and restoration needs to be performed in units of signed modules. rice field.
本発明は、上述の課題の少なくとも一つに鑑みて成されたものであり、データの改ざんが検知された場合に自動復旧処理を実行する装置において、復旧時間を短縮する仕組みを提供する。 SUMMARY OF THE INVENTION The present invention has been made in view of at least one of the above problems, and provides a mechanism for shortening recovery time in a device that executes automatic recovery processing when falsification of data is detected.
本発明は、例えば、情報処理装置であって、プログラムを格納した第1領域と、前記プログラムを保全するための復旧用プログラムを格納した第2領域とを有する不揮発性記憶手段と、前記不揮発性記憶手段に格納されたプログラムを実行する制御手段と、前記不揮発性記憶手段へのアクセス経路を監視し、前記第1領域及び前記第2領域へのアクセスに関するアクセス種別とアクセスしたアドレスの情報に従って、前記第1領域又は前記第2領域の一部の内容を復旧する自動復旧処理を実行する監視手段とを備えることを特徴とする。 The present invention is, for example, an information processing apparatus, comprising nonvolatile storage means having a first area storing a program and a second area storing a recovery program for maintaining the program; A control means for executing a program stored in a storage means and an access path to the non-volatile storage means are monitored, and according to the access type and the accessed address information regarding the access to the first area and the second area, and monitoring means for executing an automatic recovery process for recovering the contents of a part of the first area or the second area.
本発明によれば、データの改ざんが検知された場合に自動復旧処理を実行する装置において、復旧時間を短縮し、装置のダウンタイムを低減することができる。 Advantageous Effects of Invention According to the present invention, it is possible to shorten recovery time and reduce downtime of the apparatus in an apparatus that executes automatic recovery processing when falsification of data is detected.
以下、添付図面を参照して実施形態を詳しく説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. In addition, the following embodiments do not limit the invention according to the scope of claims. Although multiple features are described in the embodiments, not all of these multiple features are essential to the invention, and multiple features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same or similar configurations are denoted by the same reference numerals, and redundant description is omitted.
<第1の実施形態>
<情報処理装置の構成>
以下では、本発明の第1の実施形態について説明する。まず、図1を参照して、本実施形態における情報処理装置1の構成例を説明する。
<First Embodiment>
<Configuration of information processing device>
A first embodiment of the present invention will be described below. First, a configuration example of an
図1に示すように、情報処理装置1は、PC2と外部I/Fケーブル3を介して接続される。またPC2はルータ5とネットワークケーブル4を介して接続され、インターネット6へアクセスすることができる。8は情報処理装置1の使用者であり、7は情報処理装置1の提供者が公開するWebサイトである。71は当該Webサイト7で公開される情報処理装置1用のファームウェア更新アプリである。
As shown in FIG. 1, an
情報処理装置1は、CPU10、フラッシュROM12、プログラムやデータが展開されるRAM15、改ざん監視部11、SPIバス16、17や、メモリI/F18、外部I/F13、及び正常手順フラグ14を備える。一方、PC2は、いわゆるパーソナルコンピュータであり、CPU20、RAM25、HDD22、外部I/F23、及びNW I/F26を備える。
The
CPU10は、例えばARM社のCortex A9プロセッサを使用したSoC(System On Chip)であり、情報処理装置1全体の制御を行う。フラッシュROM12は、例えばSPIバスで接続される32MBのNORフラッシュメモリであり、例えばCPU10によって実行される制御ソフトウェアを格納する。
The
図1に示すように、改ざん監視部11及びフラッシュROM12は、それぞれSPIバス16に接続されている。したがって、改ざん監視部11は、SPIバス16上のフラッシュROM12の書き換え又は消去アクセスを監視することができる。CPU10はSPIバス17を介して、改ざん監視部11と正常手順フラグ14にそれぞれアクセスすることができるものとする。なお、正常手順フラグ14はCPU10や改ざん監視部11からRead/Write可能な記憶部であればよく、フラッシュROM12やRAM15上に設けられてもよい。また、正常手順フラグ14は、不正アクセス者からの盗聴を防ぐために、CPU10内や改ざん監視部11内に設けられてもよい。
As shown in FIG. 1, the
RAM15及びRAM25は、例えばDDR4メモリである。外部I/F13は、例えばUSBデバイスI/Fや、ネットワークI/Fである。ここでは、説明のためUSBデバイスI/Fであるものとする。外部I/Fケーブル3は、例えばUSBケーブルである。外部I/F23は、例えばUSBホストI/Fや、ネットワークI/Fである。ここでは、説明のためUSBホストI/Fであるものとする。HDD22は、PCのOSやアプリケーションを保持するHDD(ハードディスクドライブ)である。CPU20は、PCのOSやアプリケーションを実行するプロセッサであり、例えばIntel社のCoreプロセッサである。NW I/F26は、例えば100Base-TネットワークI/Fである。NW I/Fケーブル4は、例えば100Base-T LANケーブルである。ルータ5は、インターネット6に接続するネットワークルータである。
RAM15 and RAM25 are, for example, DDR4 memories. The external I/
<ファームウェアの更新>
次に、図2を参照して、情報処理装置1の提供者のWebサイト7によって提供されるファームウェア更新アプリ71を用いて、情報処理装置1の使用者8がフラッシュROM12を正常手順で更新するシーケンスを説明する。
<Firmware update>
Next, referring to FIG. 2, using a
S201で、PC2は、使用者8による操作に従って、情報処理装置1の提供者のWebサイト7にWebブラウザ等を用いてアクセスし、情報処理装置1用のファームウェア更新アプリ71をHDD22にダウンロードする。続いて、S202で、PC2は、情報処理装置1の使用者8に操作に従って、HDD22にダウンロードしたファームウェア更新アプリ24を実行する。S203で、ファームウェア更新アプリ24は、使用者8に対して、情報処理装置1をファームウェア更新モードに移行するための操作方法をPC2上で表示する。
In S<b>201 , the PC 2 accesses the
使用者8がS203で表示された操作方法に従って操作を行うと、S204で、情報処理装置1は、ファームウェア更新モードへの移行操作を受け付ける。続いて、S205で情報処理装置1は、正常手順フラグ14に1を設定して再起動し、再起動後にファームウェア更新アプリのみを実行する。ファームウェア更新アプリでは、情報処理装置1とPC2との間の外部I/F(ここではUSBデバイスI/F)を介して、ファームウェア更新用のデータパケットを送受信する。また、使用者8に対して、ファームウェア更新アプリは操作部にファームウェア更新中を表示する。
When the
S206でPC2は、情報処理装置1に対して、ファームウェア更新開始パケットを送信する。S207で情報処理装置1は、PC2に対して、ファームウェア更新開始ACKパケットを返信する。S208でPC2は、ファームウェアデータパケットを送信する。ファームウェアデータには、サイズ情報が含まれる。S209で情報処理装置1は、S208で受信したファームウェアサイズだけデータを受信した後、ファームウェアデータ受信完了パケットを返信する。S210で情報処理装置1は、S209でファームウェアデータを受信した後、フラッシュROM12を更新する。このとき、当該領域の消去コマンドを実行し、次に当該領域のプログラムコマンドを実行する。
In S<b>206 , the PC 2 transmits a firmware update start packet to the
次に、S211でPC2は、情報処理装置1に対してファームウェア更新が完了したかを確認するためのファームウェア更新確認パケットを送信する。S212で情報処理装置1は、S210で実行したフラッシュROMの更新が完了した後、ファームウェアデータ更新完了パケットを返信する。S213で情報処理装置1は、ファームウェア更新を完了したので、正常手順フラグ14に0を設定して再起動する。再起動後は、通常のブートシーケンスに従ってブートが行われる。
Next, in S211, the
<フラッシュROMのデータ構成>
次に、図3を参照して、32MBのフラッシュROM12内のソフトウェアプログラム領域のデータ構成例を説明する。フラッシュROM12には、1MBのブートROM領域120、1MBのブート用パラメータ領域121、1MBのブートROM復旧用領域122、13MBのシステム領域123、8MBのアプリ領域124、及び8MBのアプリ用データ領域125が含まれる。
<Data structure of flash ROM>
Next, with reference to FIG. 3, a data configuration example of the software program area in the 32
本実施形態では、情報処理装置1の起動用ソフトウェアが改ざんされた場合に自動復旧するため、図3の斜線でハッチングされたブートROM領域120と、ブートROM復旧用領域122とを改ざん監視領域とする。ブートROM領域120のアドレス範囲は0x00000000~0x000FFFFFであり、ブートROM復旧用領域122のアドレス範囲は0x00200000~0x002FFFFFであるものとする。
In this embodiment, the
ブートROM領域120及びブートROM復旧用領域122には、同じ内容のデータが書き込まれている。即ち、ブートROM領域120が改ざんされた場合は、ブートROM復旧用領域122からデータをブートROM領域に復旧し、ブートROM復旧用領域122が改ざんされた場合は、ブートROM領域からデータをブートROM復旧領域に復旧する。
The same data are written in the
<改ざん監視部>
次に、図4を参照して、改ざん監視部11の詳細構成について説明する。図4に示すように、改ざん監視部11は、制御部110、アドレス監視部112、及びコマンド監視部114を備える。
<Tampering monitoring unit>
Next, a detailed configuration of the
改ざん監視部11の制御部110は、改ざん監視部11全体の制御を行うマイコンであり、SPIバス17を介して、CPU10からの制御を受け付けてフラッシュROM12の記憶領域へのアクセスをアドレスレベルで監視する。監視対象アドレス111は、フラッシュROM12の記憶領域のうち、改ざんを監視するアドレス範囲を設定するレジスタであり、SPIバス17経由で制御部110により設定が行われる。例えば図3を例にして監視対象アドレス111を設定する場合、監視対象アドレス111は、0x00000000~0x000FFFFFの1MBと、0x00200000~0x002FFFFFの1MBとなる。即ち、改ざん監視部11は、ブートROM領域120へのアクセスと、ブートROM復旧用領域122へのアクセスとを監視する。
The
アドレス監視部112は、SPIバス16上のアクセスアドレスを監視する。正常手順フラグ14に0(ゼロ)が設定されており、かつ監視対象アドレス111に設定されている監視対象アドレスにアクセスされた場合に、改ざん時アドレス113に当該アクセスのアドレスを記憶する。ここで、正常手順フラグ14に0(ゼロ)が設定されている場合は監視対象アドレスを監視することを示す。一方、正常手順フラグ14に1が設定されている場合は、正常手順で書き換えが行われるものとするため、アドレス監視は行わない。
The address monitor 112 monitors access addresses on the
コマンド監視部114は、SPIバス16上のコマンドを監視する。正常手順フラグ14に0(ゼロ)が設定されている場合に、フラッシュROM12に対して、アクセス種別がErase系コマンド又はProgram系コマンドが発行された場合に、改ざん時コマンド115に当該コマンドを記憶する。正常手順フラグ14に1が設定されている場合は、正常手順で書き換えが行われるものとするため、コマンド監視は行わない。なお、Erase系コマンドとは、例えば4KB Sector Erase(20h)や32KB Block Erase(52h)、64KB Block Erase(D8h)などである。また、Program系コマンドとは、例えばPage Program(02h)、Quad Page Program(32h)などである。このようにフラッシュROM12に対するコマンドのうち、データ内容が変化するアクセス種別、例えば削除や書込みのコマンドを監視対象とする。一方で、データ内容が変化しないアクセス種別であり読込みのコマンド等については監視対象としない。
A
<不正アプリの動作例>
次に、図5を参照して、本実施形態に係る構成において不正アプリが動作する場合の一例について説明する。図5は、何らかの理由によりRAM15上で実行されているアプリが改ざんされ、不正アプリ19が実行されている状態を示す。本実施形態では、フラッシュROMを基板から取り外す等によって書き換えるような改ざんについては復旧時間の短縮効果がないため適用外とし、説明しない。
<Example of Malicious App Behavior>
Next, with reference to FIG. 5, an example of a case where an unauthorized application operates in the configuration according to this embodiment will be described. FIG. 5 shows a state in which the application running on the
一般的に、不正な改ざんはネットワークプログラムや外部I/Fに不正なデータを与えることで、データ領域をオーバーフローさせるなどして、例外処理を発生させ、この例外処理時に不正アプリを呼び出すようにして行われる。そのため、不正アプリは、初期の段階ではRAM15上で実行されている場合がほとんどである。RAM15上で不正アプリが実行された場合、次の段階では不正アプリが恒久的に実行できるようにフラッシュROM等の不揮発メモリへの改ざんを行い、次回起動時にも不正アプリが実行できるように試みることになる。
In general, unauthorized tampering involves giving unauthorized data to a network program or external I/F, causing an exception to occur such as overflowing the data area, and calling an unauthorized application during this exception. done. Therefore, most of the unauthorized applications are executed on the
<処理手順>
次に、図6を参照して、図5の状態において、フラッシュROM12が改ざんされた場合にどのように監視して復旧するかについての本実施形態に係る処理手順を説明する。以下で説明する処理は、改ざん監視部11による処理である。S601~S607は改ざん監視処理であり、S608~S612は自動復旧処理である。
<Processing procedure>
Next, with reference to FIG. 6, a processing procedure according to the present embodiment regarding how to monitor and restore when the
情報処理装置1へ電源が投入されると、S601で改ざん監視部11はSPIバスの監視を開始する。続いて、S602で改ざん監視部11は、CPU10のリセットを解除してCPU10をブートする。リセットが解除されたCPU10は、SPIフラッシュからデータを読み出し、ブート処理を実行する。
When the
次に、S603で改ざん監視部11は、電源がオフされたかどうかを判断する。電源がオフされたと判断した場合はS612へ進み、電源がオン状態の場合はS604へ進む。S604で改ざん監視部11は、正常手順フラグ14が0(ゼロ)であるかどうかを判断する。0の場合はS605へ進み、1の場合はS603へ処理を戻す。一方、S603で電源オフと判断されるとS612へ進み、改ざん監視部11は、SPIバスの監視を終了する。
Next, in S603, the
S605で改ざん監視部11は、フラッシュROM12に対して、Erase系又はProgram系のコマンドが発生したかどうかを判断する。発生した場合はS606へ進み、そうでない場合はS603へ処理を戻す。S606で改ざん監視部11は、S605のコマンドを改ざん時コマンド115へ、その後に指定されたアドレスを改ざん時アドレス113へ記憶して、S607へ進む。
In S<b>605 , the
S607で改ざん監視部11は、改ざん時アドレス113に記憶されたアドレスが監視対象アドレス111の範囲内かどうかを判別する。範囲内の場合はS608へ進み、範囲外の場合はS603へ処理を戻す。S608で改ざん監視部11は、フラッシュROM12に対する改ざんが行われたとみなし、一旦CPU10をリセットし、これ以上の改ざんが行われないように制御し、S609へ進む。
In S<b>607 , the
S609で改ざん監視部11は、改ざんコマンドがErase系であるか否かを判断する。Erase系の場合はS610へ進み、Erase系でない場合はS611へ進む。S610で改ざん監視部11は、Erase系の改ざんに対する自動復旧処理を行う。詳細には、改ざん監視部11は、改ざん時アドレス113と改ざん時コマンド115から、消去されたブロックの範囲に対応するデータをブートROM領域120又はブートROM復旧用領域122から読み出し、当該データを消去されたブロックに再プログラムする。再プログラムが完了(自動復旧処理が完了)した後、S602へ処理を戻す。ここで、ブロックとは、アクセスされたアドレスである改ざん時アドレス113を含むフラッシュROM12の一部の領域である所定領域を示す。このように、アクセス種別が消去である場合は、ブートROM領域120又はブートROM復旧用領域122の一方の一部の領域に対して、ブートROM領域120又はブートROM復旧用領域122の他方から対応するデータを読み込んで書き込む。
In S609, the
一方、S611で改ざん監視部11は、Program系の改ざんに対する自動復旧処理を行う。詳細には、改ざん監視部11は、改ざん時アドレス113と改ざん時コマンド115から、不正にProgramされたブロックを一旦消去する。その後、当該範囲に対応するデータをブートROM領域120又はブートROM復旧用領域122から読み出し、当該データを不正にProgramされたブロックに再プログラムする。再プログラムが完了(自動復旧処理が完了)した後、処理をS602へ戻す。このように、アクセス種別が書込みである場合は、ブートROM領域120又はブートROM復旧用領域122の一方の一部の領域を作成し、ブートROM領域120又はブートROM復旧用領域122の他方から対応するデータを読み込んで書き込む。
On the other hand, in S611, the
<処理シーケンス>
次に、図7を参照して、改ざん監視部11が改ざんを監視している際に、不正アプリ19がフラッシュROM12を改ざんした場合のシーケンスの一例を説明する。
<Processing sequence>
Next, with reference to FIG. 7, an example of a sequence when the
図7における時刻1において、改ざん監視部11は、図6のフローチャートのS601~S604の処理を実行して改ざんを監視している状態にある。監視対象アドレス111には、ブートROM領域120及びブートROM復旧用領域122のアドレス範囲である0x00000000~0x000FFFFFの1MBと0x00200000~0x002FFFFFの1MBとが設定されている。また正常手順フラグ14には0(ゼロ)が設定されている状態である。
At
時刻2において、不正アプリ19が、フラッシュROM12のブートROM領域120の0x00000100から256バイトを改ざんするために、SPIバスにPage Programコマンド(02h)を発行したと想定する。この場合改ざん監視部11は、上記S604において正常手順フラグ=0であるためS605に進み、さらにS605でProgram系コマンドと判断するため上記S606へ進み、コマンド(02h)及び引き続き発行されるアドレスを記憶する。
Assume that at
時刻2以降、不正アプリ19は、引き続き、SPIバスのクロックに応じて、アドレスアクセスを行う。ブートROM領域120のアドレス0x00000100を指定するA23:16=0x00、A15:08=0x01、A07:00=0x00をSPIバス上に発行する。さらに引き続き、改ざん用のデータ256バイトをData Byte1~Data Byte256でSPIバス上に発行する。この場合、改ざん監視部11は、上記S607に従ってSPIバス上に発行されたアドレスが監視対象アドレス111の範囲内かどうかを判別し、範囲内であるのでS608へ進む。
After
時刻3において、改ざん監視部11は、上記S608において、直ちにCPU10にリセット可能でないため、時刻2で発行されたSPIバスアクセスが完了するまで待機する。
At
時刻4において、時刻2で発行されたSPIバスアクセスが完了する。改ざん監視部11は、上記S608において、CPU10をリセットし、S609へ進む。改ざん監視部11は、S609において、時刻2で発行された改ざんコマンドがErase系ではなかったためS611へ進み、自動復旧処理を開始する。改ざん監視部11は、上記S612で、フラッシュROM12へのコマンドが完了したかどうかを判定するためにRead Status Reg(05h)コマンドを発行して、BUSYかどうかを確認する。
At time 4, the SPI bus access issued at
時刻5において、改ざん監視部11は、上記S611の自動復旧処理において、フラッシュROM12へのコマンドが完了したかどうかを判定するためにRead Status Reg(05h)コマンドを発行する。ここではNOT BUSYが返信されたため、コマンドが完了したことを確認する。改ざん監視部11は、時刻2において不正アプリ19によって改ざんされたフラッシュROM12の領域をSector Eraseコマンドを用いて消去する。
At
時刻6において、改ざん監視部11は、上記S611の自動復旧処理において、改ざん時アドレス113に記憶されたアドレスがブートROM領域120のアドレスであるため、ブートROM復旧用領域122から、復旧用データを読み出す。時刻7において、改ざん監視部11は、上記S611の自動復旧処理において、時刻6で読み出した復旧用データを用いて、改ざんされたブートROM領域を再プログラムして復旧する。時刻8において、改ざん監視部11は、上記S611の自動復旧処理が完了したためS602に処理を戻し、CPU10のリセットを解除してCPU10をブートする。
At time 6, the
<自動復旧処理に要する時間>
以下では、自動復旧処理に要する時間について説明する。
<Time required for automatic recovery processing>
The time required for automatic recovery processing will be described below.
例えば、図3のようにブートROM領域120の1MBのどこが改ざんされたかわからない場合においては、以下の時間が必要となる。フラッシュROM12は25MHz(=1サイクルは40ns)で動作するものとする。この場合、1MB分のErase処理には64KB Block Eraseコマンド(ブロック消去時間2秒)を16回(≒約32秒)必要とする。また、Read Dataコマンド(39サイクル=1560ns)を1048576回(≒約1.6秒)必要とする。さらに、再Program処理には256バイトPage Programコマンド(実行時間約3.5ms)を4096回(≒約1.5秒)必要とする。したがって、これらの合計で約35秒の自動復旧処理となる。
For example, as shown in FIG. 3, when it is unknown where in 1 MB of the
一方、本実施形態に係る改ざん監視部11によって、改ざんされた領域がアドレスレベルで特定されている場合は以下の時間を要する。例えば、PageProgramコマンド(256バイト)で改ざんされた場合について計算する。この場合、当該256バイトのErase処理には4KB Sector Eraseコマンド(セクタ消去時間400ms)が必要となる。また、Read Dataコマンド(39サイクル)を256回(≒約0.5ms)必要する。さらに、再Program処理には256バイトPage Programコマンド(実行時間約3.5ms)を1回(=3.5ms)必要とする。したがって、これらの合計で405msの自動復旧処理となる。また、Sector Eraseコマンド(4KB)で改ざんされた場合について計算する。この場合、Read Dataコマンド(39サイクル)を4096回(≒約6.3ms)必要とする。再Program処理には256バイトPage Programコマンド(実行時間約3.5ms)を16回(=56ms)必要とする。したがって、これらの合計で60msの自動復旧処理となる。
On the other hand, when the
このように、改ざん位置をアドレスレベルで特定しない場合にはブートROM領域120の全体を対象として自動復旧処理を行う必要があるため約35秒の復旧時間を要する。一方で、本実施形態によれば、改ざん位置をアドレスレベルで特定するため、当該箇所のみを対象とした復旧処理とすることができる。これにより、Programコマンドの場合には405msec程度となり、Eraseコマンドの場合は60msの復旧時間となり、大幅に復旧時間を低減することができる。
In this way, if the tampered position is not specified at the address level, the automatic recovery process must be performed for the entire
以上説明したように、本実施形態に係る情報処理装置は、プログラムを格納した第1領域と、前記プログラムを保全するための復旧用プログラムを格納した第2領域とを有する不揮発性記憶部を備える。さらに、本情報処理装置は、不揮発性記憶部に格納されたプログラムを実行する制御部を備える。本情報処理装置は、不揮発性記憶部へのアクセス経路を監視し、第1領域及び第2領域へのアクセスに関するアクセス種別とアクセスしたアドレスの情報に従って、第1領域又は第2領域の一部の内容を復旧する自動復旧処理を実行する。このように、本実施形態によれば改ざん監視部11によって、フラッシュROM12の改ざんを監視し、改ざん時のアドレスとコマンドを取得して、当該アドレスを含む最小限の領域を自動復旧処理の対象とすることができる。これにより、復旧処理に要する時間を最小限にすることが可能となる。
As described above, the information processing apparatus according to the present embodiment includes a nonvolatile storage unit having a first area storing a program and a second area storing a recovery program for maintaining the program. . Further, the information processing apparatus includes a control section that executes the program stored in the nonvolatile storage section. This information processing apparatus monitors an access path to a nonvolatile storage unit, and according to information on an access type and an accessed address regarding access to a first area and a second area, a part of the first area or the second area. Execute automatic recovery processing to recover the contents. As described above, according to the present embodiment, the
上記実施形態では、SPIフラッシュの改ざん監視を例として説明したが、他の種類のバスや不揮発性メモリであってもよいことは言うまでもない。また、本実施形態では、正常手順フラグ14と改ざん監視部11をCPU10とは別構成として説明した。しかしながら、改ざんを狙う攻撃者はSPIバス16やSPIバスI17をタッピング(盗聴)しつつ、正常手順でフラッシュROM12を更新する手順を真似る可能性がある。そこで、改ざん監視部11や正常手順フラグ14を容易にタッピングできないようにCPU(SoC)10のパッケージ内部にマルチチップパッケージとして内包するような構成であってもよい。
In the above embodiments, the tampering monitoring of the SPI flash has been described as an example, but it goes without saying that other types of buses and non-volatile memories may also be used. Further, in the present embodiment, the
<第2の実施形態>
以下では、本発明の第2の実施形態について説明する。上記第1の実施形態では、正常手順フラグ14を用いて改ざんかどうかを判定する例を示した。この場合、正常手順フラグ14が攻撃者によって改ざんされた場合には、フラッシュROM12の改ざんを許してしまう可能性がある。そこで、本実施形態では、正常手順フラグ14がファームウェア更新アプリの通信プロトコルによる正しい手順を経た場合のみに設定される例を示す。
<Second embodiment>
Below, the 2nd Embodiment of this invention is described. In the first embodiment, the
<設定手順>
図8は、本実施形態に係る情報処理装置の構成を示す。上記第1の実施形態で説明した図1の構成と同様の構成については同一の参照符号を付し、説明を省略する。図8に示すように、本実施形態に係る情報処理装置1では、正常手順フラグ14への設定手順が異なる。
<Setting procedure>
FIG. 8 shows the configuration of an information processing apparatus according to this embodiment. The same reference numerals are given to the same configurations as those of FIG. 1 described in the first embodiment, and the description thereof is omitted. As shown in FIG. 8, the procedure for setting the
図2を参照して、ファームウェア更新アプリによる正常手順でのファームウェア更新について説明する。上記第1の実施形態では、図2に示すように、情報処理装置1に対して、S205で正常手順フラグ14を1に設定して再起動している。一方、本実施形態では、S205で正常手順フラグ14を1に設定せず、以下の手順1~4を順に行うことを契機に正常手順フラグ14をS210の直前で1に設定するようなハードウェアを有する。図8の例では、正常手順フラグ14への専用の信号線801を介してCPU10が上記ハードウェアとして機能する例を示している。しかし、本発明はこれに限定されず、例えば当該手順1~4を監視して、専用の信号線を介して正常手順フラグ14の設定を行う設定部を上記ハードウェアとして別途設けてもよい。
Firmware update in a normal procedure by the firmware update application will be described with reference to FIG. In the first embodiment, as shown in FIG. 2, the
手順1として、S204で情報処理装置1はファームウェア更新モードの移行操作を受け付けて実行する。続いて手順2として、S205で情報処理装置1は正常手順フラグ14に1を設定することなく、ファームウェア更新アプリだけを実行するように再起動を行う。手順3として、S206で情報処理装置1はファームウェア更新開始パケットを受信する。手順4として、S208で情報処理装置1はファームウェアデータ送信パケットを受信する。上記手順1~4が正常に行われると、CPU10は、専用の信号線801を介して正常手順フラグ14を1に設定する。
As a
以上説明したように、本実施形態によれば、予め定められた手順が行われた場合に、前記所定の手順で処理されていることを示すフラグの値を該フラグに専用の信号線を介して設定する設定部をさらに備える。設定部はCPU10として設けられてもよいし、別のハードウェアとして設けられてもよい。これにより、ファームウェア更新アプリによる正しい手順を経た場合のみ正常手順フラグ14が専用の信号線を介して設定され、攻撃者による正常手順フラグ14の改ざんを防止することができる。上記説明した正常手順フラグが設定される手順の例は、攻撃者に容易に推察されない手順であれば、正常更新手順のうち、情報処理装置1とPC2の間の操作や通信パケットのどれを用いてもよいことは言うまでもない。
As described above, according to the present embodiment, when a predetermined procedure is performed, the value of the flag indicating that the predetermined procedure is being processed is sent to the flag via a dedicated signal line. It further comprises a setting unit for setting the The setting unit may be provided as the
<その他の実施形態>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
<Other embodiments>
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by processing to It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.
発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the embodiments described above, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the claims are appended to make public the scope of the invention.
1:情報処理装置、2:PC、3:外部I/Fケーブル、4:NWケーブル、5:ルータ、6:インターネット、7:情報処理装置1の提供者のWebサイト、8:使用者、10:CPU(SoC)、11:改ざん監視部、12:フラッシュROM、13:外部I/F、14:正常手順フラグ、15、25:RAM、16、17:SPIバス、18:メモリI/F、20:CPU、22:HDD、23:外部I/F、24:ダウンロードしたファームウェア更新アプリ、26:NW I/F
1: Information processing device, 2: PC, 3: External I/F cable, 4: NW cable, 5: Router, 6: Internet, 7: Website of provider of
Claims (11)
プログラムを格納した第1領域と、前記プログラムを保全するための復旧用プログラムを格納した第2領域とを有する不揮発性記憶手段と、
前記不揮発性記憶手段に格納されたプログラムを実行する制御手段と、
前記不揮発性記憶手段へのアクセス経路を監視し、前記第1領域及び前記第2領域へのアクセスに関するアクセス種別とアクセスしたアドレスの情報に従って、前記第1領域又は前記第2領域の一部の内容を復旧する自動復旧処理を実行する監視手段と
を備えることを特徴とする情報処理装置。 An information processing device,
non-volatile storage means having a first area storing a program and a second area storing a recovery program for maintaining the program;
a control means for executing a program stored in the nonvolatile storage means;
monitoring the access path to the non-volatile storage means, and according to the information of the access type and the accessed address regarding the access to the first area and the second area, the contents of the part of the first area or the second area; and monitoring means for executing automatic restoration processing for restoring the information processing apparatus.
前記監視手段は、前記フラグが前記所定の手順で処理されていることを示さない場合に、前記所定の手順とは異なる手順で前記第1領域又は前記第2領域へアクセスが行われたと判断することを特徴とする請求項2に記載の情報処理装置。 further comprising holding means for holding a value of a flag indicating that the process is being performed according to the predetermined procedure;
The monitoring means determines that the first area or the second area is accessed by a procedure different from the prescribed procedure when the flag does not indicate that the process is performed according to the prescribed procedure. 3. The information processing apparatus according to claim 2, characterized by:
前記所定の手順とは異なる手順で前記第1領域又は前記第2領域へのアクセスが行われた場合に、前記アクセス種別と、前記アクセスしたアドレスの情報とを記憶する手段と、
前記アクセスが終了すると、記憶した情報に従って前記自動復旧処理を実行する手段とを備えることを特徴とする請求項2乃至5の何れか1項に記載の情報処理装置。 The monitoring means
means for storing the access type and information of the accessed address when the first area or the second area is accessed by a procedure different from the predetermined procedure;
6. The information processing apparatus according to any one of claims 2 to 5, further comprising means for executing said automatic recovery processing according to stored information when said access is terminated.
前記不揮発性記憶手段へのアクセス経路を監視する工程と、
前記第1領域及び前記第2領域へのアクセスに関するアクセス種別とアクセスしたアドレスの情報に従って、前記第1領域又は前記第2領域の一部の内容を復旧する自動復旧処理を実行する工程と
を含むことを特徴とする監視方法。 non-volatile storage means having a first area storing a program and a second area storing a recovery program for maintaining the program; and control means for executing the program stored in the non-volatile storage means. A method for monitoring an information processing device comprising
monitoring an access path to said non-volatile storage means;
and executing an automatic recovery process for recovering the contents of a part of the first area or the second area according to the access type and the accessed address information regarding the access to the first area and the second area. A monitoring method characterized by:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021126042A JP2023020590A (en) | 2021-07-30 | 2021-07-30 | Information processing apparatus and monitoring method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021126042A JP2023020590A (en) | 2021-07-30 | 2021-07-30 | Information processing apparatus and monitoring method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2023020590A true JP2023020590A (en) | 2023-02-09 |
Family
ID=85159747
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021126042A Pending JP2023020590A (en) | 2021-07-30 | 2021-07-30 | Information processing apparatus and monitoring method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2023020590A (en) |
-
2021
- 2021-07-30 JP JP2021126042A patent/JP2023020590A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4668416B2 (en) | Protecting boot block code when enabling write access to the boot block | |
US7664923B2 (en) | Method and system for updating software | |
JP5575338B2 (en) | Information processing apparatus, information processing method, and computer program | |
TW201624273A (en) | Firmware variable update method | |
WO2020062887A1 (en) | Firmware upgrading method and system based on flash micro-controller, and flash micro-controller | |
JP2000357095A (en) | Method and device for downloading software to embedded system | |
CN112947977A (en) | Software online upgrading method and system | |
CN114721493B (en) | Chip starting method, computer equipment and readable storage medium | |
JP3830867B2 (en) | Single-chip microcomputer and its boot area switching method | |
JP2000293367A (en) | Nonvolatile-memory built-in microcomputer | |
JP2023020590A (en) | Information processing apparatus and monitoring method | |
JP3805195B2 (en) | Program rewriting apparatus and program rewriting method | |
JP2003157204A (en) | Device and method for rewriting data and storage medium | |
JP2009176147A (en) | Electronic equipment and method for determining permission of access to memory of electronic equipment | |
CN113778485A (en) | System operation method and device of electronic chip, electronic chip and storage medium | |
US20050068842A1 (en) | Electronic device, nonvolatile memory and method of overwriting data in nonvolatile memory | |
JP2001273143A (en) | Electronic controller | |
JP2004094628A (en) | Memory rewriting control system for flash memory, memory rewriting control method, and program allowing execution of each process of memory rewriting control method | |
TWI738243B (en) | Server system | |
JP2003122575A (en) | Information processing unit | |
KR20000033437A (en) | Apparatus for implementing function of bootstrap loader | |
JP2002073360A (en) | Start information rewrite device | |
JP2001147814A (en) | Start processing updating device | |
JPH10287001A (en) | Data rewriting device | |
JP2005228225A (en) | Memory card adaptor |