JP2023020590A - Information processing apparatus and monitoring method - Google Patents

Information processing apparatus and monitoring method Download PDF

Info

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
Application number
JP2021126042A
Other languages
Japanese (ja)
Inventor
秀一 中村
Shuichi Nakamura
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.)
Canon Inc
Original Assignee
Canon 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 Canon Inc filed Critical Canon Inc
Priority to JP2021126042A priority Critical patent/JP2023020590A/en
Publication of JP2023020590A publication Critical patent/JP2023020590A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Hardware Redundancy (AREA)
  • Stored Programmes (AREA)

Abstract

To provide a mechanism for reducing recovery time in an apparatus that executes automatic restoration processing when data alteration is detected.SOLUTION: An information processing apparatus includes a nonvolatile storage unit having a first region storing a program and a second region storing a restoration program for conserving the program. The information processing apparatus includes a control unit which executes the program stored in the nonvolatile storage unit. The information processing apparatus monitors an access path to the nonvolatile storage unit, and executes automatic restoration processing to restore a part of the contents in the first region or the second region in accordance with information on addresses and types of accesses to the first region and the second region.SELECTED DRAWING: Figure 4

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 Patent Document 1, when tampering with a boot program module is detected at startup, the tampered module is updated to perform automatic recovery. Further, according to Patent Literature 2, an OS monitoring device that monitors software updates is used to safely and efficiently monitor integrity and soundness during software updates and operations. Such an information processing device that detects software tampering and performs automatic recovery processing detects tampering at startup to prevent startup using unauthorized ROM data, and restores normal ROM data before startup. be able to.

特開2020-82441号公報Japanese Unexamined Patent Application Publication No. 2020-82441 特許第4288292号公報Japanese Patent No. 4288292

しかしながら、上記従来技術には以下に記載する課題がある。ソフトウェアの改ざんは、動作検証が十分に行われていない盲点(いわゆるソフトウェアの脆弱性)をついて、情報処理装置の提供者が想定していない例外処理等を潜り込ませる等によって行われている場合が多い。このような場合、例外処理を潜り込まされたソフトウェアは、情報処理装置の提供者が想定した動作ができない、或いは動作が完全でない状態になっていると考えられ、使用者にとって不利益を生じさせる虞がある。 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.

一実施形態に係る情報処理装置の構成の一例を示す図。The figure which shows an example of a structure of the information processing apparatus which concerns on one Embodiment. 一実施形態に係る正常手順でのファームウェア更新の一例を示すシーケンス図。FIG. 4 is a sequence diagram showing an example of firmware update in a normal procedure according to one embodiment; 一実施形態に係るフラッシュROM内のソフトウェアモジュール配置を示す図。FIG. 3 is a diagram showing the arrangement of software modules in a flash ROM according to one embodiment; 一実施形態に係る改ざん監視部11の詳細図。FIG. 3 is a detailed diagram of the falsification monitoring unit 11 according to one embodiment; 一実施形態に係る不正アプリの動作例を示す図。The figure which shows the example of the operation|movement of the unauthorized application which concerns on one embodiment. 一実施形態に係るフローチャート。4 is a flow chart according to one embodiment. 一実施形態に係る改ざん監視部11による改ざん監視と自動復旧の動作例を示すシーケンス図。4 is a sequence diagram showing an operation example of tampering monitoring and automatic recovery by the tampering monitoring unit 11 according to the embodiment; FIG. 一実施形態に係る構成の一例を示す図。The figure which shows an example of the structure which concerns on one Embodiment.

以下、添付図面を参照して実施形態を詳しく説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 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 information processing apparatus 1 according to the present embodiment will be described with reference to FIG.

図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 information processing apparatus 1 is connected to a PC 2 via an external I/F cable 3 . Also, the PC 2 is connected to the router 5 via the network cable 4 and can access the Internet 6 . 8 is the user of the information processing apparatus 1, and 7 is the website published by the provider of the information processing apparatus 1. FIG. A firmware update application 71 for the information processing apparatus 1 is published on the website 7 .

情報処理装置1は、CPU10、フラッシュROM12、プログラムやデータが展開されるRAM15、改ざん監視部11、SPIバス16、17や、メモリI/F18、外部I/F13、及び正常手順フラグ14を備える。一方、PC2は、いわゆるパーソナルコンピュータであり、CPU20、RAM25、HDD22、外部I/F23、及びNW I/F26を備える。 The information processing apparatus 1 includes a CPU 10, a flash ROM 12, a RAM 15 in which programs and data are loaded, a tampering monitor 11, SPI buses 16 and 17, a memory I/F 18, an external I/F 13, and a normal procedure flag 14. On the other hand, PC2 is what is called a personal computer, and is provided with CPU20, RAM25, HDD22, external I/F23, and NW I/F26.

CPU10は、例えばARM社のCortex A9プロセッサを使用したSoC(System On Chip)であり、情報処理装置1全体の制御を行う。フラッシュROM12は、例えばSPIバスで接続される32MBのNORフラッシュメモリであり、例えばCPU10によって実行される制御ソフトウェアを格納する。 The CPU 10 is an SoC (System On Chip) using, for example, an ARM Cortex A9 processor, and controls the entire information processing apparatus 1 . The flash ROM 12 is, for example, a 32 MB NOR flash memory connected via an SPI bus, and stores control software executed by the CPU 10, for example.

図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 tampering monitor 11 and the flash ROM 12 are connected to the SPI bus 16, respectively. Therefore, the tampering monitor 11 can monitor rewrite or erase access to the flash ROM 12 on the SPI bus 16 . It is assumed that the CPU 10 can access the tampering monitor 11 and the normal procedure flag 14 via the SPI bus 17, respectively. Note that the normal procedure flag 14 may be a storage unit that can be read/written from the CPU 10 or the falsification monitoring unit 11 , and may be provided on the flash ROM 12 or RAM 15 . Also, the normal procedure flag 14 may be provided in the CPU 10 or the tampering monitor 11 in order to prevent wiretapping by an unauthorized accessor.

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/F 13 is, for example, a USB device I/F or network I/F. Here, for the sake of explanation, it is assumed to be a USB device I/F. The external I/F cable 3 is, for example, a USB cable. The external I/F 23 is, for example, a USB host I/F or network I/F. Here, for the sake of explanation, it is assumed to be a USB host I/F. The HDD 22 is an HDD (hard disk drive) that holds the OS and applications of the PC. The CPU 20 is a processor that executes the PC OS and applications, and is, for example, an Intel Core processor. The NW I/F 26 is, for example, a 100Base-T network I/F. The NW I/F cable 4 is, for example, a 100Base-T LAN cable. A router 5 is a network router that connects to the Internet 6 .

<ファームウェアの更新>
次に、図2を参照して、情報処理装置1の提供者のWebサイト7によって提供されるファームウェア更新アプリ71を用いて、情報処理装置1の使用者8がフラッシュROM12を正常手順で更新するシーケンスを説明する。
<Firmware update>
Next, referring to FIG. 2, using a firmware update application 71 provided by the website 7 of the provider of the information processing device 1, the user 8 of the information processing device 1 updates the flash ROM 12 in a normal procedure. Explain the sequence.

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 website 7 of the provider of the information processing device 1 using a web browser or the like according to the operation by the user 8 , and downloads the firmware update application 71 for the information processing device 1 to the HDD 22 . Subsequently, in S<b>202 , the PC 2 executes the firmware update application 24 downloaded to the HDD 22 according to the operation of the user 8 of the information processing device 1 . In S<b>203 , the firmware update application 24 displays to the user 8 an operation method for shifting the information processing apparatus 1 to the firmware update mode on the PC 2 .

使用者8がS203で表示された操作方法に従って操作を行うと、S204で、情報処理装置1は、ファームウェア更新モードへの移行操作を受け付ける。続いて、S205で情報処理装置1は、正常手順フラグ14に1を設定して再起動し、再起動後にファームウェア更新アプリのみを実行する。ファームウェア更新アプリでは、情報処理装置1とPC2との間の外部I/F(ここではUSBデバイスI/F)を介して、ファームウェア更新用のデータパケットを送受信する。また、使用者8に対して、ファームウェア更新アプリは操作部にファームウェア更新中を表示する。 When the user 8 performs an operation according to the operation method displayed in S203, the information processing apparatus 1 receives an operation to shift to the firmware update mode in S204. Subsequently, in S205, the information processing apparatus 1 sets the normal procedure flag 14 to 1, restarts, and executes only the firmware update application after the restart. The firmware update application transmits and receives a data packet for firmware update via an external I/F (here, a USB device I/F) between the information processing apparatus 1 and the PC 2 . Further, the firmware update application displays to the user 8 that the firmware is being updated on the operation unit.

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 information processing apparatus 1 . In S<b>207 , the information processing apparatus 1 returns a firmware update start ACK packet to the PC 2 . At S208, PC2 transmits the firmware data packet. Firmware data includes size information. In S209, the information processing apparatus 1 receives data of the firmware size received in S208, and then returns a firmware data reception completion packet. In S210, the information processing apparatus 1 updates the flash ROM 12 after receiving the firmware data in S209. At this time, an erase command for the area is executed, and then a program command for the area is executed.

次に、S211でPC2は、情報処理装置1に対してファームウェア更新が完了したかを確認するためのファームウェア更新確認パケットを送信する。S212で情報処理装置1は、S210で実行したフラッシュROMの更新が完了した後、ファームウェアデータ更新完了パケットを返信する。S213で情報処理装置1は、ファームウェア更新を完了したので、正常手順フラグ14に0を設定して再起動する。再起動後は、通常のブートシーケンスに従ってブートが行われる。 Next, in S211, the PC 2 transmits to the information processing apparatus 1 a firmware update confirmation packet for confirming whether the firmware update has been completed. In S212, the information processing apparatus 1 returns a firmware data update completion packet after completing the update of the flash ROM executed in S210. Since the firmware update is completed in S213, the information processing apparatus 1 sets the normal procedure flag 14 to 0 and restarts. After rebooting, it will boot according to the normal boot sequence.

<フラッシュ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 MB flash ROM 12 will be described. The flash ROM 12 has a boot ROM area 120 of 1 MB, a boot parameter area 121 of 1 MB, a boot ROM recovery area 122 of 1 MB, a system area 123 of 13 MB, an application area 124 of 8 MB, and an application data area 125 of 8 MB. included.

本実施形態では、情報処理装置1の起動用ソフトウェアが改ざんされた場合に自動復旧するため、図3の斜線でハッチングされたブートROM領域120と、ブートROM復旧用領域122とを改ざん監視領域とする。ブートROM領域120のアドレス範囲は0x00000000~0x000FFFFFであり、ブートROM復旧用領域122のアドレス範囲は0x00200000~0x002FFFFFであるものとする。 In this embodiment, the boot ROM area 120 and the boot ROM recovery area 122 hatched with diagonal lines in FIG. do. Assume that the address range of the boot ROM area 120 is 0x00000000 to 0x000FFFFF, and the address range of the boot ROM recovery area 122 is 0x00200000 to 0x002FFFFF.

ブートROM領域120及びブートROM復旧用領域122には、同じ内容のデータが書き込まれている。即ち、ブートROM領域120が改ざんされた場合は、ブートROM復旧用領域122からデータをブートROM領域に復旧し、ブートROM復旧用領域122が改ざんされた場合は、ブートROM領域からデータをブートROM復旧領域に復旧する。 The same data are written in the boot ROM area 120 and the boot ROM recovery area 122 . That is, if the boot ROM area 120 has been tampered with, data is restored from the boot ROM recovery area 122 to the boot ROM area, and if the boot ROM recovery area 122 has been tampered with, data is restored from the boot ROM area to the boot ROM area. Restore to the recovery area.

<改ざん監視部>
次に、図4を参照して、改ざん監視部11の詳細構成について説明する。図4に示すように、改ざん監視部11は、制御部110、アドレス監視部112、及びコマンド監視部114を備える。
<Tampering monitoring unit>
Next, a detailed configuration of the falsification monitoring unit 11 will be described with reference to FIG. As shown in FIG. 4 , the falsification monitor 11 includes a controller 110 , an address monitor 112 and a command monitor 114 .

改ざん監視部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 control unit 110 of the tampering monitoring unit 11 is a microcomputer that controls the entire tampering monitoring unit 11, receives control from the CPU 10 via the SPI bus 17, and monitors access to the storage area of the flash ROM 12 at the address level. do. The monitoring target address 111 is a register for setting an address range to be monitored for tampering in the storage area of the flash ROM 12 , and is set by the control unit 110 via the SPI bus 17 . For example, when the monitoring target address 111 is set using FIG. 3 as an example, the monitoring target address 111 is 1 MB from 0x00000000 to 0x000FFFFF and 1 MB from 0x00200000 to 0x002FFFFF. That is, the tampering monitor 11 monitors access to the boot ROM area 120 and access to the boot ROM recovery area 122 .

アドレス監視部112は、SPIバス16上のアクセスアドレスを監視する。正常手順フラグ14に0(ゼロ)が設定されており、かつ監視対象アドレス111に設定されている監視対象アドレスにアクセスされた場合に、改ざん時アドレス113に当該アクセスのアドレスを記憶する。ここで、正常手順フラグ14に0(ゼロ)が設定されている場合は監視対象アドレスを監視することを示す。一方、正常手順フラグ14に1が設定されている場合は、正常手順で書き換えが行われるものとするため、アドレス監視は行わない。 The address monitor 112 monitors access addresses on the SPI bus 16 . When the normal procedure flag 14 is set to 0 (zero) and the monitored address set in the monitored address 111 is accessed, the address of the access is stored in the tampered address 113 . Here, when 0 (zero) is set in the normal procedure flag 14, it indicates that the monitored address is to be monitored. On the other hand, when the normal procedure flag 14 is set to 1, it is assumed that rewriting is performed according to the normal procedure, so address monitoring is not performed.

コマンド監視部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 command monitoring unit 114 monitors commands on the SPI bus 16 . When the normal procedure flag 14 is set to 0 (zero), when an access type of an Erase command or a Program command is issued to the flash ROM 12, the command is stored in the tampering command 115. . When the normal procedure flag 14 is set to 1, rewriting is performed according to the normal procedure, so command monitoring is not performed. Erase commands are, for example, 4KB Sector Erase (20h), 32KB Block Erase (52h), 64KB Block Erase (D8h), and the like. Program commands are, for example, Page Program (02h), Quad Page Program (32h), and the like. As described above, among the commands to the flash ROM 12, an access type that changes the data content, such as a delete or write command, is monitored. On the other hand, an access type in which the data content does not change, such as a read command, is not monitored.

<不正アプリの動作例>
次に、図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 RAM 15 has been tampered with for some reason and the unauthorized application 19 is running. In the present embodiment, tampering such as rewriting by removing the flash ROM from the substrate is not applicable because it has no effect of shortening the recovery time, and will not be described.

一般的に、不正な改ざんはネットワークプログラムや外部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 RAM 15 at the initial stage. When the unauthorized application is executed on the RAM 15, in the next step, the non-volatile memory such as flash ROM is tampered with so that the unauthorized application can be executed permanently, and an attempt is made so that the unauthorized application can be executed at the next startup. become.

<処理手順>
次に、図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 flash ROM 12 is tampered with in the state of FIG. 5 will be described. The processing described below is processing by the falsification monitoring unit 11 . S601 to S607 are falsification monitoring processing, and S608 to S612 are automatic recovery processing.

情報処理装置1へ電源が投入されると、S601で改ざん監視部11はSPIバスの監視を開始する。続いて、S602で改ざん監視部11は、CPU10のリセットを解除してCPU10をブートする。リセットが解除されたCPU10は、SPIフラッシュからデータを読み出し、ブート処理を実行する。 When the information processing apparatus 1 is powered on, the tampering monitor 11 starts monitoring the SPI bus in S601. Subsequently, in S<b>602 , the tampering monitoring unit 11 releases the reset of the CPU 10 and boots the CPU 10 . The reset-released CPU 10 reads data from the SPI flash and executes boot processing.

次に、S603で改ざん監視部11は、電源がオフされたかどうかを判断する。電源がオフされたと判断した場合はS612へ進み、電源がオン状態の場合はS604へ進む。S604で改ざん監視部11は、正常手順フラグ14が0(ゼロ)であるかどうかを判断する。0の場合はS605へ進み、1の場合はS603へ処理を戻す。一方、S603で電源オフと判断されるとS612へ進み、改ざん監視部11は、SPIバスの監視を終了する。 Next, in S603, the tampering monitoring unit 11 determines whether the power has been turned off. If it is determined that the power is turned off, the process proceeds to S612, and if the power is on, the process proceeds to S604. In S604, the tampering monitor 11 determines whether the normal procedure flag 14 is 0 (zero). If it is 0, the process proceeds to S605, and if it is 1, the process returns to S603. On the other hand, if it is determined in S603 that the power is off, the process proceeds to S612, and the tampering monitoring unit 11 finishes monitoring the SPI bus.

S605で改ざん監視部11は、フラッシュROM12に対して、Erase系又はProgram系のコマンドが発生したかどうかを判断する。発生した場合はS606へ進み、そうでない場合はS603へ処理を戻す。S606で改ざん監視部11は、S605のコマンドを改ざん時コマンド115へ、その後に指定されたアドレスを改ざん時アドレス113へ記憶して、S607へ進む。 In S<b>605 , the falsification monitoring unit 11 determines whether or not an Erase or Program command has been issued to the flash ROM 12 . If so, the process proceeds to S606; otherwise, the process returns to S603. In S606, the tampering monitoring unit 11 stores the command of S605 in the tampering time command 115 and the subsequently specified address in the tampering time address 113, and proceeds to S607.

S607で改ざん監視部11は、改ざん時アドレス113に記憶されたアドレスが監視対象アドレス111の範囲内かどうかを判別する。範囲内の場合はS608へ進み、範囲外の場合はS603へ処理を戻す。S608で改ざん監視部11は、フラッシュROM12に対する改ざんが行われたとみなし、一旦CPU10をリセットし、これ以上の改ざんが行われないように制御し、S609へ進む。 In S<b>607 , the tampering monitoring unit 11 determines whether or not the address stored in the tampered address 113 is within the range of the monitored address 111 . If it is within the range, the process proceeds to S608, and if it is out of the range, the process returns to S603. In S608, the tampering monitoring unit 11 determines that the flash ROM 12 has been tampered with, temporarily resets the CPU 10, controls so that no further tampering is performed, and proceeds to S609.

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 tampering monitoring unit 11 determines whether the tampering command is of the Erase type. If it is the Erase type, the process proceeds to S610, and if it is not the Erase type, the process proceeds to S611. In S610, the tampering monitoring unit 11 performs automatic recovery processing for Erase type tampering. Specifically, the tampering monitoring unit 11 reads the data corresponding to the erased block range from the boot ROM area 120 or the boot ROM recovery area 122 from the tampering address 113 and the tampering command 115, and erases the data. reprogram to the block that has been After the reprogramming is completed (automatic recovery processing is completed), the processing is returned to S602. Here, the block indicates a predetermined area which is a partial area of the flash ROM 12 including the tampered address 113 which is the accessed address. In this way, when the access type is erasing, one of the boot ROM area 120 and the boot ROM recovery area 122 is supported by the other of the boot ROM area 120 and the boot ROM recovery area 122. Read and write data to

一方、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 tampering monitoring unit 11 performs automatic recovery processing for program-based tampering. Specifically, the tampering monitoring unit 11 temporarily erases a block illegally programmed from the tampering address 113 and the tampering command 115 . After that, the data corresponding to the range is read from the boot ROM area 120 or the boot ROM recovery area 122, and the data is reprogrammed into the illegally programmed block. After the reprogramming is completed (automatic recovery processing is completed), the process returns to S602. Thus, when the access type is write, a partial area of either the boot ROM area 120 or the boot ROM recovery area 122 is created, and the other of the boot ROM area 120 or the boot ROM recovery area 122 responds. Read and write data to

<処理シーケンス>
次に、図7を参照して、改ざん監視部11が改ざんを監視している際に、不正アプリ19がフラッシュROM12を改ざんした場合のシーケンスの一例を説明する。
<Processing sequence>
Next, with reference to FIG. 7, an example of a sequence when the flash ROM 12 is tampered with by the unauthorized application 19 while the tampering monitoring unit 11 is monitoring tampering will be described.

図7における時刻1において、改ざん監視部11は、図6のフローチャートのS601~S604の処理を実行して改ざんを監視している状態にある。監視対象アドレス111には、ブートROM領域120及びブートROM復旧用領域122のアドレス範囲である0x00000000~0x000FFFFFの1MBと0x00200000~0x002FFFFFの1MBとが設定されている。また正常手順フラグ14には0(ゼロ)が設定されている状態である。 At time 1 in FIG. 7, the tampering monitoring unit 11 is in a state of monitoring tampering by executing the processes of S601 to S604 in the flowchart of FIG. In the monitoring target address 111, 1 MB from 0x00000000 to 0x000FFFFF and 1 MB from 0x00200000 to 0x002FFFFF, which are the address ranges of the boot ROM area 120 and the boot ROM recovery area 122, are set. Also, the normal procedure flag 14 is set to 0 (zero).

時刻2において、不正アプリ19が、フラッシュROM12のブートROM領域120の0x00000100から256バイトを改ざんするために、SPIバスにPage Programコマンド(02h)を発行したと想定する。この場合改ざん監視部11は、上記S604において正常手順フラグ=0であるためS605に進み、さらにS605でProgram系コマンドと判断するため上記S606へ進み、コマンド(02h)及び引き続き発行されるアドレスを記憶する。 Assume that at time 2, the malicious application 19 issues a Page Program command (02h) to the SPI bus in order to alter the 256 bytes from 0x00000100 in the boot ROM area 120 of the flash ROM 12. FIG. In this case, the tampering monitoring unit 11 advances to S605 because the normal procedure flag is 0 in S604, and further advances to S606 to determine that the command is a program-based command in S605, and stores the command (02h) and the subsequently issued address. do.

時刻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 time 2, the unauthorized application 19 continues to access the address according to the clock of the SPI bus. A23:16=0x00, A15:08=0x01, and A07:00=0x00 specifying address 0x00000100 in the boot ROM area 120 are issued on the SPI bus. Subsequently, 256 bytes of data for falsification are issued on the SPI bus as Data Byte1 to Data Byte256. In this case, the falsification monitoring unit 11 determines whether or not the address issued on the SPI bus is within the range of the monitored address 111 according to the above S607.

時刻3において、改ざん監視部11は、上記S608において、直ちにCPU10にリセット可能でないため、時刻2で発行されたSPIバスアクセスが完了するまで待機する。 At time 3, the tampering monitoring unit 11 waits until the SPI bus access issued at time 2 is completed because it cannot immediately be reset by the CPU 10 in S608.

時刻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 time 2 is completed. The tampering monitoring unit 11 resets the CPU 10 in S608, and proceeds to S609. Since the tampering command issued at time 2 was not of the Erase type in S609, the tampering monitoring unit 11 advances to S611 and starts the automatic recovery process. In S612, the falsification monitoring unit 11 issues a Read Status Reg (05h) command to determine whether the command to the flash ROM 12 has been completed, and checks whether it is BUSY.

時刻5において、改ざん監視部11は、上記S611の自動復旧処理において、フラッシュROM12へのコマンドが完了したかどうかを判定するためにRead Status Reg(05h)コマンドを発行する。ここではNOT BUSYが返信されたため、コマンドが完了したことを確認する。改ざん監視部11は、時刻2において不正アプリ19によって改ざんされたフラッシュROM12の領域をSector Eraseコマンドを用いて消去する。 At time 5, the tampering monitor 11 issues a Read Status Reg (05h) command to determine whether or not the command to the flash ROM 12 has been completed in the automatic restoration process of S611. Since NOT BUSY is returned here, it is confirmed that the command has been completed. The tampering monitoring unit 11 erases the area of the flash ROM 12 that has been tampered with by the unauthorized application 19 at time 2 using the Sector Erase command.

時刻6において、改ざん監視部11は、上記S611の自動復旧処理において、改ざん時アドレス113に記憶されたアドレスがブートROM領域120のアドレスであるため、ブートROM復旧用領域122から、復旧用データを読み出す。時刻7において、改ざん監視部11は、上記S611の自動復旧処理において、時刻6で読み出した復旧用データを用いて、改ざんされたブートROM領域を再プログラムして復旧する。時刻8において、改ざん監視部11は、上記S611の自動復旧処理が完了したためS602に処理を戻し、CPU10のリセットを解除してCPU10をブートする。 At time 6, the tampering monitoring unit 11 retrieves the recovery data from the boot ROM recovery area 122 because the address stored in the tampered address 113 is the address of the boot ROM area 120 in the automatic recovery process of S611. read out. At time 7, the tampering monitoring unit 11 uses the recovery data read at time 6 to reprogram and recover the boot ROM area that has been tampered with in the automatic recovery process of S611. At time 8, the tampering monitoring unit 11 returns the process to S602 because the automatic restoration process of S611 is completed, cancels the reset of the CPU 10, and boots the CPU 10. FIG.

<自動復旧処理に要する時間>
以下では、自動復旧処理に要する時間について説明する。
<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 boot ROM area 120 has been tampered with, the following time is required. It is assumed that the flash ROM 12 operates at 25 MHz (=1 cycle is 40 ns). In this case, 16 KB Block Erase commands (block erasing time of 2 seconds) are required 16 times (approximately 32 seconds) to erase 1 MB. In addition, Read Data commands (39 cycles=1560 ns) are required 1048576 times (approximately 1.6 seconds). Further, the reprogram processing requires 4096 times (approximately 1.5 seconds) of 256-byte Page Program commands (execution time of approximately 3.5 ms). Therefore, in total, the automatic restoration process takes about 35 seconds.

一方、本実施形態に係る改ざん監視部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 tampering monitoring unit 11 according to the present embodiment identifies the tampered area at the address level, the following time is required. For example, calculation is made for the case where the PageProgram command (256 bytes) is tampered with. In this case, a 4 KB Sector Erase command (sector erase time of 400 ms) is required for the Erase processing of 256 bytes. Also, the Read Data command (39 cycles) is required 256 times (approximately 0.5 ms). Furthermore, the re-program processing requires a 256-byte Page Program command (execution time of about 3.5 ms) once (=3.5 ms). Therefore, the sum total of these is 405 ms for automatic recovery processing. Also, the calculation is made for the case where the data is tampered with by the Sector Erase command (4 KB). In this case, the Read Data command (39 cycles) is required 4096 times (approximately 6.3 ms). The reprogram processing requires 16 times (=56 ms) of 256-byte Page Program commands (execution time is about 3.5 ms). Therefore, the sum total of these is 60 ms for automatic recovery processing.

このように、改ざん位置をアドレスレベルで特定しない場合にはブート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 boot ROM area 120, and therefore recovery time of about 35 seconds is required. On the other hand, according to the present embodiment, since the tampered position is specified at the address level, it is possible to carry out restoration processing only for the relevant position. As a result, the recovery time is about 405 msec for the Program command and 60 ms for the Erase command, so that the recovery time can be greatly reduced.

以上説明したように、本実施形態に係る情報処理装置は、プログラムを格納した第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 tampering monitoring unit 11 monitors tampering of the flash ROM 12, acquires the address and command at the time of tampering, and selects the minimum area including the address as the target of the automatic restoration process. can do. This makes it possible to minimize the time required for recovery processing.

上記実施形態では、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 normal procedure flag 14 and the tampering monitor 11 are configured separately from the CPU 10 . However, there is a possibility that an attacker aiming at falsification may imitate the procedure for updating the flash ROM 12 in a normal procedure while tapping (eavesdropping) the SPI bus 16 and SPI bus I17. Therefore, a configuration may be adopted in which the tampering monitoring unit 11 and the normal procedure flag 14 are included as a multi-chip package inside the package of the CPU (SoC) 10 so that they cannot be easily tapped.

<第2の実施形態>
以下では、本発明の第2の実施形態について説明する。上記第1の実施形態では、正常手順フラグ14を用いて改ざんかどうかを判定する例を示した。この場合、正常手順フラグ14が攻撃者によって改ざんされた場合には、フラッシュROM12の改ざんを許してしまう可能性がある。そこで、本実施形態では、正常手順フラグ14がファームウェア更新アプリの通信プロトコルによる正しい手順を経た場合のみに設定される例を示す。
<Second embodiment>
Below, the 2nd Embodiment of this invention is described. In the first embodiment, the normal procedure flag 14 is used to determine whether or not the data has been tampered with. In this case, if the normal procedure flag 14 is tampered with by an attacker, the flash ROM 12 may be tampered with. Therefore, in the present embodiment, an example is shown in which the normal procedure flag 14 is set only when the correct procedure according to the communication protocol of the firmware update application is passed.

<設定手順>
図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 normal procedure flag 14 is different in the information processing apparatus 1 according to the present embodiment.

図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 information processing apparatus 1 is restarted after setting the normal procedure flag 14 to 1 in S205. On the other hand, in the present embodiment, the normal procedure flag 14 is not set to 1 in S205, and the normal procedure flag 14 is set to 1 immediately before S210 by performing the following procedures 1 to 4 in order. have The example of FIG. 8 shows an example in which the CPU 10 functions as the hardware via a dedicated signal line 801 to the normal procedure flag 14 . However, the present invention is not limited to this, and for example, a setting unit that monitors the procedures 1 to 4 and sets the normal procedure flag 14 via a dedicated signal line may be separately provided as the hardware.

手順1として、S204で情報処理装置1はファームウェア更新モードの移行操作を受け付けて実行する。続いて手順2として、S205で情報処理装置1は正常手順フラグ14に1を設定することなく、ファームウェア更新アプリだけを実行するように再起動を行う。手順3として、S206で情報処理装置1はファームウェア更新開始パケットを受信する。手順4として、S208で情報処理装置1はファームウェアデータ送信パケットを受信する。上記手順1~4が正常に行われると、CPU10は、専用の信号線801を介して正常手順フラグ14を1に設定する。 As a procedure 1, in S204, the information processing apparatus 1 receives and executes an operation to shift to the firmware update mode. Subsequently, as step 2, in S205, the information processing apparatus 1 does not set the normal procedure flag 14 to 1, and restarts so that only the firmware update application is executed. As procedure 3, the information processing apparatus 1 receives a firmware update start packet in S206. As procedure 4, the information processing apparatus 1 receives the firmware data transmission packet in S208. When the procedures 1 to 4 are normally performed, the CPU 10 sets the normal procedure flag 14 to 1 via the dedicated signal line 801 .

以上説明したように、本実施形態によれば、予め定められた手順が行われた場合に、前記所定の手順で処理されていることを示すフラグの値を該フラグに専用の信号線を介して設定する設定部をさらに備える。設定部は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 CPU 10 or may be provided as separate hardware. As a result, the normal procedure flag 14 is set via a dedicated signal line only when the correct procedure is performed by the firmware update application, and tampering with the normal procedure flag 14 by an attacker can be prevented. As an example of the procedure in which the above-described normal procedure flag is set, if the procedure is not easily guessed by an attacker, any of the normal update procedures, such as an operation between the information processing device 1 and the PC 2 or a communication packet, is used. It goes without saying that

<その他の実施形態>
本発明は、上述の実施形態の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 information processing device 1, 8: User, 10 : CPU (SoC), 11: Tampering monitor, 12: Flash ROM, 13: External I/F, 14: Normal procedure flag, 15, 25: RAM, 16, 17: SPI bus, 18: Memory I/F, 20: CPU, 22: HDD, 23: External I/F, 24: Downloaded firmware update application, 26: NW I/F

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領域へアクセスが行われた場合に前記自動復旧処理を実行することを特徴とする請求項1に記載の情報処理装置。 2. The information processing according to claim 1, wherein said monitoring means executes said automatic recovery processing when said first area or said second area is accessed by a procedure different from a predetermined procedure. Device. 前記所定の手順で処理されていることを示すフラグの値を保持する保持手段をさらに備え、
前記監視手段は、前記フラグが前記所定の手順で処理されていることを示さない場合に、前記所定の手順とは異なる手順で前記第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:
予め定められた手順が行われた場合に、前記所定の手順で処理されていることを示すフラグの値を該フラグに専用の信号線を介して設定する設定手段をさらに備えることを特徴とする請求項3に記載の情報処理装置。 The apparatus further comprises setting means for setting a value of a flag, which indicates that the processing is performed according to the predetermined procedure, to the flag via a dedicated signal line when a predetermined procedure is performed. The information processing apparatus according to claim 3. 前記監視手段は、前記アクセスしたアドレスを含む所定領域を対象に前記自動復旧処理を実行することを特徴とする請求項2乃至4の何れか1項に記載の情報処理装置。 5. The information processing apparatus according to any one of claims 2 to 4, wherein said monitoring means executes said automatic recovery processing on a predetermined area including said accessed address. 前記監視手段は、
前記所定の手順とは異なる手順で前記第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乃至6の何れか1項に記載の情報処理装置。 7. The information processing apparatus according to claim 1, wherein said access type is writing or erasing to said non-volatile storage means. 前記アクセス種別が書込みである場合の前記自動復旧処理では、前記第1領域又は前記第2領域の一方の一部の領域のデータを削除し、前記第1領域又は前記第2領域の他方から対応するデータを読み込み、該一部の領域に読み出したデータを書き込むことを特徴とする請求項1乃至7の何れか1項に記載の情報処理装置。 In the automatic recovery process when the access type is write, data in a part of one of the first area and the second area is deleted, and the other of the first area and the second area is processed. 8. The information processing apparatus according to any one of claims 1 to 7, wherein the read data is read and the read data is written in the partial area. 前記アクセス種別が消去である場合の前記自動復旧処理では、前記第1領域又は前記第2領域の一方の一部の削除された領域に対して、前記第1領域又は前記第2領域の他方から対応するデータを読み込み、該一部の領域に読み出したデータを書き込むことを特徴とする請求項1乃至8の何れか1項に記載の情報処理装置。 In the automatic recovery processing when the access type is erasure, for the deleted area of one of the first area and the second area, the other of the first area and the second area 9. The information processing apparatus according to any one of claims 1 to 8, wherein corresponding data is read and the read data is written in the partial area. 前記アクセス経路は、前記不揮発性記憶手段と前記制御手段との間で信号を送受するバスであることを特徴とする請求項1乃至9の何れか1項に記載の情報処理装置。 10. The information processing apparatus according to claim 1, wherein said access path is a bus for transmitting and receiving signals between said nonvolatile storage means and said control means. プログラムを格納した第1領域と、前記プログラムを保全するための復旧用プログラムを格納した第2領域とを有する不揮発性記憶手段と、前記不揮発性記憶手段に格納されたプログラムを実行する制御手段とを備える情報処理装置の監視方法であって、
前記不揮発性記憶手段へのアクセス経路を監視する工程と、
前記第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:
JP2021126042A 2021-07-30 2021-07-30 Information processing apparatus and monitoring method Pending JP2023020590A (en)

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)

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