JP6976365B2 - In-vehicle control device - Google Patents
In-vehicle control device Download PDFInfo
- Publication number
- JP6976365B2 JP6976365B2 JP2020009571A JP2020009571A JP6976365B2 JP 6976365 B2 JP6976365 B2 JP 6976365B2 JP 2020009571 A JP2020009571 A JP 2020009571A JP 2020009571 A JP2020009571 A JP 2020009571A JP 6976365 B2 JP6976365 B2 JP 6976365B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- cpu
- system call
- monitoring
- malicious
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 claims description 625
- 230000008569 process Effects 0.000 claims description 614
- 238000012544 monitoring process Methods 0.000 claims description 127
- 238000012545 processing Methods 0.000 claims description 115
- 230000006870 function Effects 0.000 claims description 40
- 238000005259 measurement Methods 0.000 claims description 2
- 230000005856 abnormality Effects 0.000 description 73
- 230000006854 communication Effects 0.000 description 61
- 238000004891 communication Methods 0.000 description 47
- 238000001514 detection method Methods 0.000 description 16
- 230000010485 coping Effects 0.000 description 15
- 230000002159 abnormal effect Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 8
- 230000007958 sleep Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 6
- 238000012795 verification Methods 0.000 description 6
- 230000009471 action Effects 0.000 description 5
- 238000001994 activation Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 4
- KNMAVSAGTYIFJF-UHFFFAOYSA-N 1-[2-[(2-hydroxy-3-phenoxypropyl)amino]ethylamino]-3-phenoxypropan-2-ol;dihydrochloride Chemical compound Cl.Cl.C=1C=CC=CC=1OCC(O)CNCCNCC(O)COC1=CC=CC=C1 KNMAVSAGTYIFJF-UHFFFAOYSA-N 0.000 description 3
- 230000004913 activation Effects 0.000 description 3
- 230000006399 behavior Effects 0.000 description 3
- 230000001186 cumulative effect Effects 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 239000000126 substance Substances 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 239000000919 ceramic Substances 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000010355 oscillation Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000004622 sleep time Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/84—Vehicles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
Description
本開示は、車載制御装置に関する。 The present disclosure relates to an in-vehicle control device.
従来、車両システム内における故障発生時に故障したECU(Electronic Control Unit)を特定し、車両が稼働可能なうちにバックアップとして用意した制御に切り替えるものが知られている(例えば、特許文献1参照)。 Conventionally, there is known a device that identifies an ECU (Electronic Control Unit) that has failed when a failure occurs in a vehicle system and switches to a control prepared as a backup while the vehicle can operate (see, for example, Patent Document 1).
しかし、従来の車両システムは、悪意のあるプログラムの実行が想定される場合、バックアップとして用意した制御への切り替えを妨害される可能性がある。従って、悪意のあるプログラムによって車両システムが妨害された状態で車両の稼働を継続させるのは難しい。 However, conventional vehicle systems may be prevented from switching to backup-prepared controls if malicious programs are expected to be executed. Therefore, it is difficult to keep the vehicle running while the vehicle system is disturbed by a malicious program.
本開示は、上記のような課題を解決するためになされたものであり、悪意のあるプログラムによって車両システムが妨害された状態でも車両の稼働を継続させることができる車載制御装置を得ることを目的とする。 The present disclosure has been made to solve the above-mentioned problems, and an object of the present invention is to obtain an in-vehicle control device capable of continuing the operation of the vehicle even when the vehicle system is disturbed by a malicious program. And.
本開示に係る車載制御装置は、入出力インターフェースを管理するカーネルと前記カーネルの機能を呼び出すシステムコールとを含むオペレーティングシステムと、前記システムコールを呼び出すことにより前記入出力インターフェースに接続されている電装品を制御するプログラムと、を記憶する二次記憶装置と、前記プログラムの実行状態であるプロセスにより想定される前記システムコールの呼び出し状況に基づいて、前記プログラムに悪意があるか否かを判定するCPUと、を備え、前記CPUは、予め設定された許容周期内に前記プログラムに含まれる複数の処理部分が呼び出され、前記複数の処理部分の実行順序が前記プログラムの仕様通りであって、前記プロセスのうち前記複数の処理部分を監視する監視プロセスの戻り値がエラー値以外である場合、前記プログラムに悪意がないと判定する。 The vehicle-mounted control device according to the present disclosure includes an operating system including a kernel that manages an input / output interface and a system call that calls a function of the kernel, and an electrical component connected to the input / output interface by calling the system call. A CPU that determines whether or not the program is malicious based on the program that controls the program, the secondary storage device that stores the program, and the call status of the system call assumed by the process that is the execution state of the program. And, in the CPU, a plurality of processing portions included in the program are called within a preset allowable cycle, and the execution order of the plurality of processing portions is as specified in the program, and the process. If the return value of the monitoring process that monitors the plurality of processing portions is other than the error value, it is determined that the program is not malicious.
本開示によれば、悪意のあるプログラムによって車両システムが妨害された状態でも車両の稼働を継続させることができる。 According to the present disclosure, the vehicle can continue to operate even when the vehicle system is disturbed by a malicious program.
図1は、実施の形態による車載制御装置の構成の一例を示す図である。図1の一例においては、上位の電子制御装置であるECU1と、下位の電子制御装置であるECU2とが、通信線6を介して接続されていることにより、車両に搭載される車両システムが構成されている。ECU1及びECU2は、通信線6を介して互いに連係して各種制御を実行する。なお、通信線6には、例えば、ワイヤーハーネスが用いられている。
FIG. 1 is a diagram showing an example of a configuration of an in-vehicle control device according to an embodiment. In one example of FIG. 1, the
ここで、ECUは、Electronic Control Unitを意味する電子制御装置の総称である。ECU1及びECU2は、車載電装品を制御する。
Here, the ECU is a general term for electronic control devices that mean an Electronic Control Unit.
具体的には、ECU1には、車載電装品として、カメラ3、レーダー4及びディスプレイ5が接続されている。ECU1は、カメラ3及びレーダー4の検知結果に基づいて、ディスプレイ5に各種画像を表示させる。
Specifically, the
カメラ3は、例えば、フロントガラスの車室側のうちバックミラーの隣に取り付けられている。カメラ3には、例えば、単眼カメラが用いられている。単眼カメラは、撮像素子を有している。撮像素子は、例えば、CCDイメージセンサ又はCMOSイメージセンサである。CCDは、Charge Coupled Deviceの略称である。CMOSは、Complementary Metal Oxide Semiconductorの略称である。単眼カメラは、撮像素子の撮像方向に対して直交する2次元空間における画素レベルを最小単位として連続的に物体の有無を検出可能である。
The
レーダー4は、例えば、車両におけるフロントバンパー及びリアバンパーのそれぞれに取り付けられている。レーダー4には、例えば、ミリ波レーダーが用いられている。ミリ波レーダーは、1つの送信アンテナと、複数の受信アンテナとを有している。ミリ波レーダーは、物体との距離及び相対速度を測定可能である。 The radar 4 is attached to each of the front bumper and the rear bumper in the vehicle, for example. For the radar 4, for example, a millimeter wave radar is used. The millimeter wave radar has one transmitting antenna and a plurality of receiving antennas. Millimeter-wave radar can measure distance and relative velocity to an object.
ディスプレイ5は、例えば、フロントガラスの下部の領域にあるダッシュボードに取り付けられている。ディスプレイ5には、例えば、タッチパネル付き液晶ディスプレイが用いられている。
The
ECU1は、SoC10、二次記憶装置12及びRAM13を備えている。
The
SoCは、System−on−a−Chipの略称である。RAMは、Random Access Memoryの略称である。 SoC is an abbreviation for System-on-a-Chip. RAM is an abbreviation for Random Access Memory.
SoC10は、ECU1において制御部として機能する。SoC10は、入出力インターフェース101、CPU102、メモリインターフェース103、HSM104、ROM105、タイマ106及び通信インターフェース107を備えている。
The SoC10 functions as a control unit in the
CPUは、Central Processing Unitの略称である。HSMは、Hardware Security Moduleの略称である。ROMは、Read Only Memoryの略称である。 CPU is an abbreviation for Central Processing Unit. HSM is an abbreviation for Hardware Security Module. ROM is an abbreviation for Read Only Memory.
入出力インターフェース101は、カメラ3及びレーダー4のそれぞれからの入力データをSoC10に入力する入力インターフェースとして機能する。入出力インターフェース101は、カメラ3及びレーダー4に制御信号を出力する。入出力インターフェース101は、カメラ3から入力データとして画像データの入力を受け付ける。入出力インターフェース101は、レーダー4から入力データとして障害物データの入力を受け付ける。
The input /
また、入出力インターフェース101は、SoC10からの出力データをディスプレイ5に出力する出力インターフェースとして機能する。入出力インターフェース101は、ディスプレイ5に出力データとして映像データを出力する。これにより、ディスプレイ5は、映像データに基づいた画像を表示することができる。
Further, the input /
なお、図示は省略するが、SoC10は、DMAを備えている。DMAは、Direct Memory Accessの略称である。入出力インターフェース101は、DMAの機能を利用することにより、CPU102を介さずに、入力データをRAM13に転送することができる。同様に、入出力インターフェース101は、DMAの機能を利用することにより、CPU102を介さずに、出力データをRAM13から転送することができる。これにより、転送処理を効率化することができる。
Although not shown, the SoC10 includes a DMA. DMA is an abbreviation for Direct Memory Access. By using the function of DMA, the input /
CPU102は、コアを有している。CPU102は、コアにより各種演算を実行する。CPU102は、実行した演算結果に基づいて、車載電装品を制御する機能を有している。
The
具体的には、CPU102は、SoC10に電源が投入された場合、動作を開始する機能を有している。CPU102は、ROM105に書き込まれた各種プログラムの実行を開始する機能を有している。CPU102は、メモリインターフェース103を介して、二次記憶装置12に記憶されているものをRAM13に転送することにより、車載電装品を制御する機能を有している。
Specifically, the
なお、CPU102は、シングルコアから構成されているだけでなく、マルチコアから構成されていてもよい。また、CPU102は、通常実行されているプログラムとは別に適宜別のプログラムによる割り込み処理をすることができる。
The
メモリインターフェース103は、二次記憶装置12とSoC10との間における各種データの送受信と、RAM13とSoC10との間における各種データの送受信とを行うインターフェースである。
The
具体的には、メモリインターフェース103は、CPU102又はDMAからのデータアクセス要求に応じて、二次記憶装置12及びRAM13のそれぞれに適したコマンドを発行する。これにより、メモリインターフェース103は、二次記憶装置12及びRAM13のそれぞれに記憶されている各種データにアクセス可能である。
Specifically, the
HSM104は、セキュリティの強度を高めるために、秘密鍵を外部に漏洩しないように記憶している。HSM104は、データの暗号化及び復号、メッセージ認証コードの生成及び検証、デジタル署名の検証等を行う機能を有している。これらの機能は、CPU102からHSM104にアクセスすることで利用される。
The
なお、HSM104には、秘密鍵が既に書き込まれている。また、HSM104は、メッセージ認証コードの生成及び検証並びにデジタル署名の検証が可能な状態に設定されている。
The private key has already been written in the
ROM105には、SoC10に電源が投入されてからCPU102が動作を開始するときに最初に実行するプログラムが記憶されている。ROM105には、IPLと呼ばれるプログラムが記憶されている。IPLは、Initial Program Loaderの略称である。
The
タイマ106は、発振回路から出力されるクロック信号をカウントする。発振回路は、例えば、水晶発振器又はセラミック振動子である。タイマ106は、CPU102の要求に応じて、クロック信号に基づいた各種タイミング信号を生成する。
The
通信インターフェース107は、他の機器と、SoC10との間における通信を実現するインターフェースである。通信インターフェース107は、CAN、CAN FD、FlexRay、Ethernet(登録商標)等の各種通信規格に準拠している。これにより、通信インターフェース107は、通信線6を介して他の機器との通信を実現する。ここで、図1の一例では、通信媒体として有線の通信線6の一例について説明したが、通信媒体は、無線であってもよい。
The
なお、CANは、Controller Area Networkの略称である。また、CAN FDは、CAN with Flexible Data−Rateの略称である。 In addition, CAN is an abbreviation for Controller Area Network. Further, CAN FD is an abbreviation for CAN with Flexible Data-Rate.
二次記憶装置12は、不揮発性の記憶装置である。二次記憶装置12は、例えば、NAND型のフラッシュメモリが用いられている。
The
二次記憶装置12は、例えば、HDD又はNOR型のフラッシュメモリが用いられてもよい。
As the
なお、HDDは、Hard Disc Driveの略称である。 HDD is an abbreviation for Hard Disk Drive.
RAM13は、揮発性の記憶装置である。RAM13は、主記憶装置又はメインメモリとして機能する。
The
また、ECU2には、車載電装品として、モータ7が接続されている。ECU2は、モータ7に設けられているセンサ8の検知信号に基づいて、モータ7の駆動を制御する。
Further, a motor 7 is connected to the
ECU2は、マイコン20、入力回路22及び駆動回路23を備えている。
The
マイコンは、マイクロコントローラユニット又はマイクロコンピュータの略称である。マイコン20は、ECU2において制御部として機能する。マイコン20は、CPU201、RAM202、ROM203、入出力インターフェース204、通信インターフェース205及びタイマ206を備えている。
Microcomputer is an abbreviation for a microcontroller unit or a microcomputer. The
CPU201は、CPU102と同様の機能を有している。従って、その詳細な説明は省略される。
The
RAM202は、RAM13と同様の機能を有している。従って、その詳細な説明は省略される。
The
ROM203は、ROM105と同様の機能を有している。従って、その詳細な説明は省略される。
The
入出力インターフェース204は、入力回路22とマイコン20との間における入力インターフェースとして機能する。例えば、入出力インターフェース204は、アナログ信号をデジタル信号に変換し、変換したデジタル信号をマイコン20に取り込む。
The input /
また、入出力インターフェース204は、マイコン20と駆動回路23との間における出力インターフェースとして機能する。例えば、入出力インターフェース204は、デジタル信号をアナログ信号に変換し、変換したアナログ信号を駆動回路23に出力する。
Further, the input /
通信インターフェース205は、他の機器と、マイコン20との間における通信を実現するインターフェースである。通信インターフェース205は、通信インターフェース107と同じ通信規格に準拠している。これにより、通信インターフェース205は、通信線6を介して、ECU1とECU2との通信を実現する。
The
タイマ206は、タイマ106と同様の機能を有している。従って、その詳細な説明は省略される。
The
入力回路22は、センサ8の検知信号を電圧として読み取る。入力回路22は、読み取った電圧をマイコン20内で処理可能な電圧値に変換する。入力回路22は、変換した電圧値をマイコン20に供給する。
The
駆動回路23は、マイコン20からの制御指令に基づいて、モータ駆動信号を生成する。駆動回路23は、モータ駆動信号をモータ7に供給する。
The
なお、駆動回路23の制御対象は、モータ7に限定されない。例えば、駆動回路23の制御対象は、LEDのような光源であってもよい。LEDは、Light Emitting Diodeの略称である。駆動回路23は、マイコン20からの制御指令に基づいて、LEDの照度を制御してもよい。
The control target of the
なお、ECU1は、本開示における車載制御装置に相当する。
The
また、カメラ3、レーダー4及びディスプレイ5は、本開示における電装品に相当する。
Further, the
図2は、図1の二次記憶装置12に記憶されている各種プログラムの階層例を示す図である。上位制御プログラム121は、複数のプログラムを含んでいる。各プログラムは、複数の処理を含んでいる。各処理は、複数の処理部分を含んでいる。
FIG. 2 is a diagram showing a hierarchical example of various programs stored in the
上位制御プログラム121は、電装品に関するプログラム、車両制御に関するプログラム、ECU2に関するプログラム、各種プログラムを監視するプログラム等を含んでいる。上位制御プログラム121の下層にはOS122が存在している。
The
OSは、Operating Systemの略称である。 OS is an abbreviation for Operating System.
電装品に関するプログラムは、電装品毎に異なっている。 Programs related to electrical components are different for each electrical component.
電装品としてのカメラ3に関するプログラムは、カメラデータ取得プログラム121B、画像変換プログラム121C、画像認識プログラム121D及び画像状況判定プログラム121Eを含む。
The program related to the
カメラデータ取得プログラム121Bは、カメラ3に固有の方式でカメラ3にアクセスし、カメラ3により撮像された画像データを取得するプログラムである。
The camera data acquisition program 121B is a program that accesses the
画像変換プログラム121Cは、カメラデータ取得プログラム121Bにより取得された画像データを適した形式に変換するプログラムである。適した形式への変換は、対象を認識するために実行される。対象は、人、障害物等である。
The
画像認識プログラム121Dは、画像変換プログラム121Cにより変換したデータから、対象の種類、対象までの距離等を認識するプログラムである。
The image recognition program 121D is a program that recognizes the type of the target, the distance to the target, and the like from the data converted by the
画像状況判定プログラム121Eは、画像認識プログラム121Dにより認識された対象の種類、対象までの距離等から最も優先すべき対処を判定するプログラムである。
The image
電装品としてのレーダー4に関するプログラムは、レーダーデータ取得プログラム121J、レーダーデータ変換プログラム121K、レーダーデータ認識プログラム121L及びレーダー状況判定プログラム121Mを含む。
The program related to the radar 4 as an electrical component includes a radar
レーダーデータ取得プログラム121Jは、レーダー4に固有の方式でレーダー4にアクセスし、レーダー4により検知された検知結果を取得するプログラムである。
The radar
レーダーデータ変換プログラム121Kは、レーダーデータ取得プログラム121Jにより取得されたレーダー4の検知結果を適した形式に変換するプログラムである。適した形式への変換は、上記で説明したように、対象を認識するために実行される。
The radar
レーダーデータ認識プログラム121Lは、レーダーデータ変換プログラム121Kにより変換されたデータから、対象の種類、対象までの距離等を認識するプログラムである。
The radar
レーダー状況判定プログラム121Mは、レーダーデータ認識プログラム121Lにより認識された対象の種類、対象までの距離等から最も優先すべき対処を判定するプログラムである。
The radar
電装品としてのディスプレイ5に関するプログラムは、ディスプレイ表示プログラム121Nを含む。ディスプレイ表示プログラム121Nは、電装品に関するプログラム、車両制御に関するプログラム、ECU2に関するプログラム、各種プログラムを監視するプログラム等の実行結果に基づいた画像をディスプレイ5に表示させるプログラムである。
The program relating to the
車両制御に関するプログラムは、総合状況判定プログラム121F及び通信プログラム121Hを含む。ここで、通信プログラム121Hは、通信線6を介して、車速、車両位置、車両挙動等を取得するプログラムである。車速は、例えば、車軸の回転数を計測するセンサから取得される。車両位置は、例えば、GPSから取得される。車両挙動は、例えば、操舵角を計測するセンサから取得される。
The program related to vehicle control includes a comprehensive
具体的には、総合状況判定プログラム121Fは、画像状況判定プログラム121Eの判定結果と、レーダー状況判定プログラム121Mの判定結果と、通信プログラム121Hの実行結果と、に基づいて、最も優先すべき対処を判定するプログラムである。
Specifically, the comprehensive
ECU2に関するプログラムは、下位制御指示プログラム121Gを含む。
The program related to the
下位制御指示プログラム121Gは、総合状況判定プログラム121Fの判定結果に基づいて、ECU2を制御するための具体的な下位制御指示値を算出するプログラムである。
The lower
各種プログラムを監視するプログラムは、起動監視プログラム121Yを含む。起動監視プログラム121Yは、上位制御プログラム121に含まれる起動プログラムリスト121Zと連動して実行される。
The program for monitoring various programs includes the
具体的には、起動監視プログラム121Yは、電装品に関するプログラム、車両制御に関するプログラム及びECU2に関するプログラムのそれぞれの実行を開始させるプログラムである。また、起動監視プログラム121Yは、これらのプログラムを必要に応じて監視するプログラムである。
Specifically, the
起動プログラムリスト121Zは、記憶場所121ZAと、デジタル署名領域121ZBとを含んでいる。
The
記憶場所121ZAには、電装品に関するプログラム、車両制御に関するプログラム及びECU2に関するプログラムのそれぞれの二次記憶装置12における記憶領域が設定されている。具体的には、例えば、二次記憶装置12において、電装品に関するプログラムによって占有される記憶領域が設定されている。
In the storage location 121ZA, storage areas in the
なお、電装品としてカメラ3が車両に搭載されていない場合には、カメラデータ取得プログラム121B、画像変換プログラム121C、画像認識プログラム121D及び画像状況判定プログラム121Eの記憶領域は、記憶場所121ZAには設定されていない。
When the
また、電装品としてカメラ3及びレーダー4が複数組車両に搭載されている場合には、その分の記憶領域が記憶場所121ZAに設定されている。
When the
デジタル署名領域121ZBには、起動プログラムリスト121Zが不正に改ざんされたことを検出可能とするためにデジタル署名が付加されている。
A digital signature is added to the digital signature area 121ZB so that it can be detected that the
OS122は、API1221、カーネル1222及びカーネルモジュール1223を含んでいる。
APIは、Application Programming Interfaceの略称である。 API is an abbreviation for Application Programming Interface.
OS122は、オペレーティングシステムである。API1221は、アプリケーションプログラミングインターフェースである。API1221は、システムコール1221A及びライブラリ1221Bを含む。
システムコール1221Aは、プログラムに対し、カーネル1222の機能を提供するインターフェースである。従って、システムコール1221Aは、カーネル1222の機能を呼び出すことができる。システムコール1221Aは、read、write、open、fork等である。このうち、forkは、新しいプロセスを立ち上げる機能を有している。従って、起動監視プログラム121Yがプロセスを起動させるには、forkが使用される。
なお、詳細についての説明は省略するが、ライブラリ1221Bは、よく使われる共通のサブルーチンである。
Although detailed description is omitted, the
カーネル1222は、ハードウェア資源を管理する機能を有している。ハードウェア資源は、入出力インターフェース101、CPU102、メモリインターフェース103、HSM104、ROM105、タイマ106及び通信インターフェース107である。従って、ハードウェア資源は、OS122の管理下にある。
例えば、カーネル1222は、入出力インターフェース101を管理する。従って、各種プログラムによりシステムコール1221Aが呼び出されれば、システムコール1221Aを介してカーネル1222の機能を呼び出すことができる。例えば、カメラデータ取得プログラム121Bは、システムコール1221Aを呼び出すように実装されている。これにより、カメラデータ取得プログラム121Bは、入出力インターフェース101を管理できる。この結果、カメラデータ取得プログラム121Bは、カメラ3により撮像された画像データを取得することができる。
For example,
カーネルモジュール1223は、カーネル1222の機能を拡張するためのバイナリファイルである。
The
上位制御プログラム121は、SoC10に電源が投入された後、起動される。
The
具体的には、二次記憶装置12に記憶されている上位制御プログラム121のうち、OS122が、ROM105に記憶されているIPLによってRAM13に転送される。これにより、OS122の起動が開始される。これにより、RAM13の記憶領域は、OS122に管理される。
Specifically, of the higher-
OS122が起動された後、電装品に関するプログラム、車両制御に関するプログラム、ECU2に関するプログラム及び各種プログラムを監視するプログラムが二次記憶装置12からOS122が管理するRAM13の記憶領域に転送される。
After the
これにより、OS122の管理下のプロセスとして、電装品に関するプログラム、車両制御に関するプログラム、ECU2に関するプログラム及び各種プログラムを監視するプログラムの実行が開始される。なお、起動プログラムリスト121Zは、起動監視プログラム121Yがプロセスとして実行中にRAM13に読み出される。
As a result, as a process under the control of
即ち、プロセスは、プログラムの実行状態である。具体的には、プロセスとは、プログラムがOS122によってRAM13に読み込まれ、OS122の管理下にあるCPU102の実行単位である。なお、OS122にとっては、プロセスとはRAM13等のようなメモリの管理単位である。
That is, the process is the execution state of the program. Specifically, the process is an execution unit of the
なお、電装品に関するプログラム、車両制御に関するプログラム、ECU2に関するプログラム及び各種プログラムを監視するプログラムの起動の順序は、ECU1に要求される内容によって異なる。従って、車両制御に関するプログラム、ECU2に関するプログラム及び各種プログラムを監視するプログラムの起動の順序は、任意である。
The order of starting the program related to electrical components, the program related to vehicle control, the program related to
そこで、ここでは、実現の容易さから、OS122の起動後、まず、起動監視プログラム121Yの実行を開始するようにOS122は設定されている。次に、起動監視プログラム121Yの実行可能な状態であるプロセスが、電装品に関するプログラム、車両制御に関するプログラム及びECU2に関するプログラムのそれぞれのプロセスの実行を開始させる。なお、起動監視プログラム121Yの実行可能な状態であるプロセスが、電装品に関するプログラム、車両制御に関するプログラム及びECU2に関するプログラムのそれぞれのプロセスを起動させる順序も任意である。
Therefore, here, for ease of realization, the
ここで、OS122の管理下にあるRAM13は、本開示における共有メモリに相当する。
Here, the
図3は、図2の上位制御プログラム121が上位のECU1に設けられたRAM13に転送されて上位制御プロセス140として存在している状態の一例を示す図である。図3に示すように、上位制御プロセス140は、共通処理141と、特有処理142とを有している。
FIG. 3 is a diagram showing an example of a state in which the higher-
共通処理141は、起動初期化処理141A、主処理141B、内部監視処理141C、安全確保処理141D、プロセス間通信処理141E及びECU間通信処理141Fを含んでいる。
The
共通処理141は、上位制御プログラム121に含まれる各プログラムに共通する処理である。
The
従って、カメラデータ取得プログラム121B、画像変換プログラム121C、画像認識プログラム121D及び画像状況判定プログラム121Eのそれぞれのプロセスは、共通処理141から構成されている。
Therefore, each process of the camera data acquisition program 121B, the
また、総合状況判定プログラム121F、下位制御指示プログラム121G、ディスプレイ表示プログラム121N及び通信プログラム121Hのそれぞれのプロセスも同様に共通処理141から構成されている。
Further, each process of the comprehensive
また、レーダーデータ取得プログラム121J、レーダーデータ変換プログラム121K、レーダーデータ認識プログラム121L及びレーダー状況判定プログラム121Mのそれぞれのプロセスも同様に共通処理141から構成されている。
Further, each process of the radar
一方、起動監視プログラム121Yの実行可能な状態であるプロセスは、共通処理141に加え、特有処理142を含んでいる。
On the other hand, the process in which the
特有処理142は、上位制御プログラム121のうち起動監視プログラム121Yに特有の処理である。特有処理142は、システムコールテーブル監視処理142H、システムコール監視処理142I及びシステムコールテーブル書き換え処理142Jを含んでいる。また、特有処理142は、起動処理リスト142K、プロセスID記憶配列142L、旧システムコールテーブル記憶配列142P及びシステムコール回数記憶配列142Rを含んでいる。
The
即ち、起動監視プログラム121Yの実行可能な状態であるプロセスは、共通処理141と、特有処理142とから構成されている。
That is, the process in which the
なお、電装品に関するプログラム、車両制御に関するプログラム、ECU2に関するプログラム及び各種プログラムを監視するプログラムは、二次記憶装置12からOS122が管理するRAM13の記憶領域に転送される。これにより、上位制御プロセス140としてCPU102による実行が開始される。
The program related to electrical components, the program related to vehicle control, the program related to
起動初期化処理141Aは、電装品に関するプログラム、車両制御に関するプログラム、ECU2に関するプログラム及び各種プログラムを監視するプログラムのそれぞれの起動及び初期化を行うプロセスである。
The start-up
例えば、カメラデータ取得プログラム121Bの起動及び初期化を行うプロセスは、カメラ3から画像データを取得できるようにカメラ3の設定を行い、カメラ3とSoC10との間において画像データを通信するための設定を行うプロセスである。
For example, in the process of starting and initializing the camera data acquisition program 121B, the
主処理141Bは、電装品に関するプログラム、車両制御に関するプログラム、ECU2に関するプログラム及び各種プログラムを監視するプログラムのそれぞれを実行するプロセスである。
The
内部監視処理141Cは、電装品に関するプログラム、車両制御に関するプログラム及びECU2に関するプログラムのそれぞれが個別に実行することによって、プログラムが仕様通りに実行されているか否かを監視する監視プロセスである。
The
例えば、内部監視処理141Cは、予め設定された許容周期内において、画像変換プログラム121Cの主処理141Bにおける特定の処理部分の実行を開始させる。この結果、内部監視処理141Cは、予め設定された許容時間内に主処理141Bにおける特定の処理部分の実行が完了したか否かを判定する。また、内部監視処理141Cは、画像変換プログラム121Cの主処理141Bにおける特定の処理部分の実行順序が画像変換プログラム121Cの仕様通りに入れ替わることなく全て実行されたか否かを判定する。また、内部監視処理141Cは、画像変換プログラム121Cの特定の命令群における引数及び戻り値が正常な範囲内か否かを判定する。
For example, the
即ち、内部監視処理141Cは、予め設定された許容周期内にプログラムに含まれる複数の処理部分が呼び出され、複数の処理部分の実行順序がプログラムの仕様通りであるか否かを判定する。また、内部監視処理141Cは、プロセスのうち複数の処理部分を監視する監視プロセスである。従って、内部監視結果として、監視プロセスの戻り値がエラー値以外である場合には、内部監視結果は正常である。内部監視結果が正常であれば、CPU102によってそのプログラムに悪意がないと判定される。
That is, the
安全確保処理141Dは、内部監視処理141Cによってプログラムの異常が検出された場合、車両を安全に稼働させるプロセスである。安全確保処理141Dは、許容時間内に実行される。
The
ここで、プログラムの異常が発生する要因には、あるプログラムの実行を意図的に妨害するプログラムの存在が想定される。あるプログラムの実行を意図的に妨害するプログラムは、本実施の形態においては悪意のあるプログラムと称する。意図的な妨害とは、例えば、RAM13に確保されたバッファをオーバーフローさせ、CPU102が後に実行するプログラムを部分的に書き換え、本来意図した処理と異なる処理を実行させる処理である。ここで、バッファは、スタック、配列等である。本来意図した処理とは異なる処理は、例えば、無限ループである。
Here, it is assumed that the cause of the program abnormality is the existence of a program that intentionally interferes with the execution of a certain program. A program that intentionally interferes with the execution of a certain program is referred to as a malicious program in this embodiment. The intentional interference is, for example, a process of overflowing the buffer secured in the
具体的には、要求仕様通りに実装されているプログラムには、特定の条件次第では弱点が含まれることになる。例えば、プログラムに含まれる特定の処理が不必要に繰り返される場合、CPU102の負荷が高い場合、又はRAM13のメモリ領域が不足している場合には、プログラムは、要求仕様とは異なる結果を生じさせることがある。
Specifically, a program implemented according to the required specifications will have weaknesses depending on specific conditions. For example, if a specific process included in the program is repeated unnecessarily, the load on the
そこで、車両システムの攻撃を検討している攻撃者によって、プログラムに含まれる弱点を見つけ出し、そのプログラムの実行状態であるプロセスに特定のコードを埋め込むことが検討されることがある。 Therefore, an attacker who is considering an attack on a vehicle system may consider finding weaknesses contained in a program and embedding specific code in a process that is the execution state of the program.
そのような攻撃者によって利用される代表的な処理は、上記で説明したように、RAM13に確保されたスタック、配列等を構成するバッファをオーバーフローさせる処理である。バッファがオーバーフローさせられた場合、本来の処理で参照される変数及び処理の分岐先のアドレス等が確保されているメモリ領域が参照される。従って、本来の処理で参照される変数及び処理の分岐先のアドレス等が異なる値に書き換えられる。
As described above, a typical process used by such an attacker is a process of overflowing a buffer constituting a stack, an array, etc. secured in the
この結果、正常なプログラムの処理が攻撃者の意図した処理に変更される。攻撃者の意図した処理のうち、比較的容易に実現でき、且つ脅威となる処理は、無限ループの処理である。無限ループの処理は、1命令程度の処理を車両システムに侵入させ、実行させることで正常なプログラムの処理の実行を完全に停止させることができる。 As a result, the normal program processing is changed to the processing intended by the attacker. Of the processes intended by the attacker, the processes that can be realized relatively easily and pose a threat are infinite loop processes. In the infinite loop process, the execution of the normal program process can be completely stopped by invading and executing the process of about one instruction in the vehicle system.
攻撃者の意図した処理は、車両システム内における通信を妨害する処理であってもよい。車両システム内における通信を妨害する処理によって正常なプログラムの処理の実行効率は著しく低下させられる。 The process intended by the attacker may be a process that interferes with communication in the vehicle system. The processing that interferes with communication in the vehicle system significantly reduces the execution efficiency of the processing of a normal program.
即ち、RAM13のメモリ領域のうち、通常の範囲から逸脱した領域に特定の値が書き込まれることにより、バッファのオーバーフローが発生する。バッファのオーバーフローが利用されることにより攻撃者は悪意のあるプログラムを車両システムに侵入させる。この結果、プログラムの妨害処理が実行されるので、処理対象のプログラムの実行状態であるプロセスは、本来の処理を実行せずに単に無限ループを実行するだけの状態に陥る。
That is, a buffer overflow occurs when a specific value is written in an area of the memory area of the
また、上記で説明したように、車両システム内における通信を妨害する処理であれば、処理対象のプログラムの実行状態であるプロセスは、本来は不要なプロセス間通信を大量に発生させることにより、別のプロセスの処理を滞らせる。 Further, as described above, if it is a process that interferes with communication in the vehicle system, the process that is in the execution state of the program to be processed is different by generating a large amount of interprocess communication that is originally unnecessary. Delays the processing of the process.
従って、最も深刻な状態であれば、CPU102は、上位制御プログラム121を実行することができない。この結果、内部監視処理141C及び安全確保処理141Dも実行不可能になることが想定される。このため、安全確保処理141Dは、同時に実行されている上位制御プログラム121のうち、異常が発生したプログラム以外のプログラムが実行を代行可能なように作成される。
Therefore, in the most serious situation, the
例えば、安全確保処理141Dは、配置されるアドレスに依存せずに実行可能なPICで作成される。PICは、Place Independent Codeの略称である。アドレスに依存しない安全確保処理141Dは、別プロセスからアクセス可能なようにRAM13の共有メモリ領域に配置される。
For example, the
なお、CPU102は、異常時に実行する安全確保処理141Dを二次記憶装置12における上位制御プログラム121が記憶されている領域とは異なる領域に実行可能ファイルとして記憶させてもよい。具体的には、安全確保処理141Dには、上位制御プログラム121における安全確保処理141Dの実行可能ファイルの開始アドレスが記憶される。即ち、実体のない安全確保処理141Dから実体のある安全確保処理141Dが呼び出されるようにしてもよい。
The
このように、安全確保処理141Dは、他のプログラムに相当するプロセスからも参照可能に構成する必要がある。このため、悪意のあるプログラムによって、改ざんされることにより、安全確保処理141D自体が悪意のあるプログラムとして作成され、記憶される可能性がある。
As described above, the
そこで、安全確保処理141Dには、デジタル署名が予め付与される。これにより、CPU102は、安全確保処理141Dの内容が正しい提供元のものであることを確認することができる。
Therefore, a digital signature is given to the
また、安全確保処理141Dの実行中に安全確保処理141Dの内容が変化する場合、CPU102は、安全確保処理141Dの内容を変更したときにHSM104によってメッセージ認証コードを計算し、付与しておく。これにより、CPU102は、安全確保処理141Dの内容が改ざんされたか否かを確認することができる。即ち、CPU102は、安全確保処理141Dの内容が正当なものであるか否かを確認することができる。
Further, when the content of the
プロセス間通信処理141Eは、主処理141Bを実行する上で、他のプロセスと連係をとるために必要な情報を交換するプロセスである。これにより、プロセス間通信処理141Eは、内部監視処理141Cの実行結果を他のプロセスに提供することができる。
The
ECU間通信処理141Fは、上位制御プログラム121の通信プログラム121Hのプロセスにアクセスするプロセスである。これにより、主処理141Bを実行する上で、ECU2と連係をとるために必要な情報が交換される。この結果、ECU間通信処理141Fは、内部監視処理141Cの実行結果をECU2に提供することができる。
The communication process 141F between ECUs is a process of accessing the process of the
システムコールテーブル監視処理142Hは、システムコール1221Aの開始アドレスが登録されたシステムコールテーブルに不正な変更があるか否かを起動監視プログラム121Yのプロセスによって監視するプロセスである。
The system call
システムコール監視処理142Iは、システムコール1221Aの代わりに呼び出され、システムコール1221Aの呼び出し元のプロセス、呼び出し頻度、呼び出し回数等を起動監視プログラム121Yのプロセスによって監視するプロセスである。システムコール監視処理142Iは、監視を行った後、システムコール1221Aの呼び出し元のプロセスがシステムコール1221Aを開始する。
The system call monitoring process 142I is called in place of the
システムコールテーブル書き換え処理142Jは、システムコール1221Aの開始アドレスをシステムコール監視処理142Iの先頭アドレスに変更するプロセスである。これにより、プロセスによってシステムコール1221Aが呼び出される度に、システムコール1221Aが呼び出される代わりに、システムコール監視処理142Iが開始される。この結果、システムコール1221A毎に監視を行うことができる。
The system call
起動処理リスト142Kは、二次記憶装置12に記憶されている起動プログラムリスト121Zの内容をRAM13に読み出すための領域である。これにより、起動監視プログラム121YがRAM13に転送され、プロセスとして実行が開始されたとき、上位制御プログラム121が必要な情報を効率良く参照できる。
The
プロセスID記憶配列142Lは、起動監視プログラム121Yによって起動されたプログラムのプロセスに固有に割り付けられることにより各プロセスを識別するための識別子であるプロセスIDを記憶するための領域である。プロセスID記憶配列142Lには、起動監視プログラム121Yによって上位制御プログラム121に含まれる画像変換プログラム121C等のプログラムが起動される度に、プログラムのプロセスに対応するプロセスIDが逐次記憶される。
The process
旧システムコールテーブル記憶配列142Pは、システムコールテーブル書き換え処理142Jによってシステムコールテーブルが書き換えられる前のシステムコールテーブルを保存するための領域である。
The old system call
具体的には、システムコールテーブルの各要素には、システムコール1221Aの開始アドレスが記憶されている。従って、旧システムコールテーブル記憶配列142Pには、システムコール1221Aの開始アドレスが記憶される。これにより、システムコール監視処理142Iによる監視終了後、旧システムコールテーブル記憶配列142Pに記憶されているシステムコール1221Aの開始アドレスを呼び出すことができる。この結果、本来のシステムコール1221Aを呼び出すことができる。
Specifically, each element of the system call table stores the start address of the
システムコール回数記憶配列142Rは、上位制御プログラム121に含まれるプログラム毎に、システムコール1221Aの呼び出し回数を記憶するための領域である。システムコール監視処理142Iが呼び出される度に、呼び出し元のプロセスのプロセスIDが取得される。従って、システムコール回数記憶配列142Rには、プロセスIDと、累積した呼び出し回数とが記憶される。
The system call
ここで、プロセスIDによってプロセスは特定される。プロセスが特定されればプログラムも特定される。また、特定したプロセスが呼び出したシステムコール1221Aの累積呼び出し回数は、システムコール回数記憶配列142Rにより参照可能である。悪意のあるプログラムは無限ループを実行しているため、システムコール1221Aの累積呼び出し回数は許容回数の範囲内にない。これにより、プログラムが悪意のあるプログラムであるか否かを判定することができる。
Here, the process is specified by the process ID. If the process is specified, the program is also specified. Further, the cumulative number of calls of the
なお、システムコールテーブル監視処理142H、システムコール監視処理142I及びシステムコールテーブル書き換え処理142Jは、システムコールテーブル及びシステムコール1221Aに変更及び追加の処理を行う。旧システムコールテーブル記憶配列142P及びシステムコール回数記憶配列142Rも同様に、システムコールテーブル及びシステムコール1221Aに変更及び追加の処理が伴う。しかし、OS122の管理下で実行される通常の実行権限のプロセスでは、システムコールテーブル及びシステムコール1221Aに変更及び追加の処理を行うことができないことがある。
The system call
例えば、システムコールテーブル書き換え処理142Jは、OS122が起動しているとき、システムコールテーブルを初期化した直後にOS122の初期化処理の一部としての実行が必要な場合がある。このような場合が想定される場合には、システムコールテーブル監視処理142H及びシステムコール監視処理142Iは、OS122の拡張機能、即ち、カーネルモジュール1223として実装される。
For example, the system call
図4は、図3の上位制御プロセス140に関するプログラム監視状態132の一例を示す図である。RAM13には、異常検知プロセスID記憶配列131及びプログラム監視状態132の領域が確保される。
FIG. 4 is a diagram showing an example of the
異常検知プロセスID記憶配列131は、FIFOのキューから構成されている。FIFOは、First−In First−Outの略称である。異常検知プロセスID記憶配列131は、悪意のあるプログラムのプロセスとして異常が検知されたプロセスのプロセスIDが記憶される。なお、上記キューの深さは、起動監視プログラム121Yによって起動処理リスト142Kが参照されることにより求められる。
The anomaly detection process
プログラム監視状態132は、プロセスID毎にプログラムの監視状態が記憶される。なお、プログラム監視状態132の領域は、起動監視プログラム121Yによりプロセスの実行を開始させる前に確保させる。
In the
プログラム監視状態132には、フラグ領域132A、許容回数領域132B、監視周期領域132C、許容周期領域132D及び異常要因対処テーブル132Eが含まれている。また、プログラム監視状態132には、タイムスタンプ領域132P、内部監視結果領域132Q、安全確保代行領域132R、安全確保処理状態132S及び認証領域132Zが含まれている。
The
フラグ領域132Aは、各プログラムが起動監視プログラム121Yによる監視を必要としているか否かを2値で起動監視プログラム121Yに提供するための領域である。2値としては、例えば、監視が必要な場合にはTRUEが設定され、監視が不要な場合にはFALSEが設定される。
The
許容回数領域132Bは、プログラムの実行状態であるプロセスが呼び出すシステムコール1221Aの回数における許容回数の範囲を提供するための領域である。システムコール1221Aの回数における許容回数の範囲は、許容下限回数と、許容上限回数との2つの値で定められている。
The permissible number of
例えば、システムコール1221Aの回数が許容回数の範囲外であることを起動監視プログラム121Yが検出した場合、CPU102は、そのプロセスに異常が発生したと判定する。これにより、そのプロセスに対応するプログラムには悪意があると判定される。
For example, when the
なお、一度も呼び出されないシステムコール1221Aの許容下限回数及び許容上限回数はゼロに設定される。
The allowable lower limit number and the allowable upper limit number of the
監視周期領域132Cは、プログラムの実行状態であるプロセスが呼び出すシステムコール毎に監視周期を起動監視プログラム121Yに提供するための領域である。監視周期領域132Cに監視周期が設定されている場合、起動監視プログラム121Yは時間の計測を開始してから監視周期に到達する度にシステムコール1221Aの呼び出し回数を許容回数領域132Bの許容回数と比較する。これにより、監視周期におけるシステムコール1221Aの呼び出し回数の異常の有無が判定される。
The
なお、周期的に呼び出されないシステムコール1221Aにおける監視周期は、監視周期領域132Cの対応する要素がゼロに設定される。
In the monitoring cycle in the
許容周期領域132Dは、内部監視処理141Cを実行する周期の許容周期を起動監視プログラム121Yに提供するための領域である。内部監視処理141Cを実行する周期の許容周期は、許容下限周期と、許容上限周期との2つの値で定められている。
The
例えば、内部監視処理141Cを実行する周期が許容周期外であることを起動初期化処理141Aが検出した場合、CPU102は、そのプロセスに異常が発生したと判定する。これにより、そのプロセスに対応するプログラムには悪意があると判定される。
For example, when the
タイムスタンプ領域132Pは、電装品に関するプログラム、車両制御に関するプログラム及びECU2に関するプログラムのそれぞれによる内部監視処理141Cが完了した時刻を起動監視プログラム121Yに提供するための領域である。
The
内部監視結果領域132Qは、電装品に関するプログラム、車両制御に関するプログラム及びECU2に関するプログラムのそれぞれによる内部監視処理141Cの結果を起動監視プログラム121Yに提供するための領域である。
The internal monitoring result area 132Q is an area for providing the result of the
認証領域132Zは、プログラム監視状態132を更新したプロセスが正当なものであることを確認可能なように、プログラム監視状態132の内容が更新される度にそのメッセージ認証コードを算出し、保存するための領域である。
The
異常要因対処テーブル132Eは、プログラムの異常要因に応じた対処を起動監視プログラム121Yに提供するための領域である。プログラムの異常要因として、ここでは以下の5つが想定される。
The abnormality factor handling table 132E is an area for providing the
第1の異常要因は、メッセージ認証コードの検証異常である。第2の異常要因は、システムコールテーブルの異常である。第3の異常要因は、システムコール1221Aの呼び出し回数が許容回数の範囲外となる異常である。第4の異常要因は、内部監視タイムスタンプの時刻の差が許容周期の範囲外となる異常である。第5の異常要因は、内部監視結果の異常である。
The first abnormality factor is the verification abnormality of the message authentication code. The second anomaly factor is an anomaly in the system call table. The third abnormality factor is an abnormality in which the number of calls of the
異常要因対処テーブル132Eには、上記異常要因に対応する対処の参照先となるアドレスが記憶されている。 In the abnormality factor handling table 132E, an address as a reference destination for handling corresponding to the above abnormality factor is stored.
例えば、第1の異常要因として、メッセージ認証コードの検証異常である場合には、該当するプロセスの実行を終了させる対処の参照先となるアドレスが記憶されている。第3の異常要因として、システムコール1221Aの呼び出し回数が許容回数の範囲外となる異常である場合には、該当するプロセスを再起動させる対処の参照先となるアドレスが記憶されている。第4の異常要因として、内部監視タイムスタンプの時刻の差が許容周期の範囲外となる異常である場合には、該当するプロセスにおける安全確保処理141Dを実行させる対処の参照先となるアドレスが記憶されている。第5の異常要因として、内部監視結果の異常である場合には、全プロセスにおける安全確保処理141Dを実行させる対処の参照先となるアドレスが記憶されている。
For example, as the first abnormality factor, in the case of the verification abnormality of the message authentication code, the address to be the reference destination of the action for terminating the execution of the corresponding process is stored. As a third abnormality factor, when the number of calls of the
なお、上記異常要因のいずれであっても、他のプロセスから受信したデータに異常があることにより、一時的に自身のプロセスを実行できない場合には、実行できない期間だけ何もしない旨の対処が記憶されている。即ち、プロセスは継続される。 In addition, if any of the above abnormal factors causes an abnormality in the data received from another process and the process cannot be executed temporarily, the countermeasure is to do nothing for the period during which the process cannot be executed. It is remembered. That is, the process continues.
安全確保代行領域132Rは、電装品に関するプログラム、車両制御に関するプログラム及びECU2に関するプログラムのそれぞれから生成された安全確保処理141Dを記憶するための領域である。
The safety
電装品に関するプログラム、車両制御に関するプログラム及びECU2に関するプログラムのいずれかが異常となり、自身のプログラムから安全確保処理141Dを生成できない場合がある。このような場合であっても、他の異常でないプログラムから生成した安全確保処理141Dに代行させるために、各安全確保処理141Dは参照可能に構成される。
One of the programs related to electrical components, the program related to vehicle control, and the program related to
安全確保処理状態132Sは、電装品に関するプログラム、車両制御に関するプログラム及びECU2に関するプログラムのそれぞれから生成された安全確保処理141Dの代行状態を記憶するための領域である。
The safety assurance process state 132S is an area for storing the proxy state of the
これにより、CPU102は、各安全確保処理141Dの代行状態として、代行開始及び代行完了のいずれかを示す値を安全確保処理状態132Sに設定することができる。従って、安全確保処理141Dの代行が複数回実施されることを防ぐことができる。また、安全確保処理141Dの代行が正常に完了したか否かを判定することができる。
As a result, the
なお、各プログラムが異常検知プロセスID記憶配列131及びプログラム監視状態132を同時に参照し、異常検知プロセスID記憶配列131及びプログラム監視状態132の少なくとも一方の変更を要求する可能性がある。そこで、OS122が提供するMUTEX等の仕組みを利用することにより、ハードウェア資源への排他的アクセスを実現させる。
In addition, each program may simultaneously refer to the abnormality detection process
MUTEXは、MUTual Exclusionの略称である。 MUTEX is an abbreviation for Mutual Expression.
例えば、レーダーデータ取得プログラム121JのプロセスがRAM13のプログラム監視状態132にアクセスしているとき、カメラデータ取得プログラム121BのプロセスがRAM13の異常検知プロセスID記憶配列131にアクセスするのを防ぐ。
For example, when the process of the radar
図5は、図1のマイコン20に設けられたROM203に存在している下位制御プログラム150の一例を示す図である。下位制御プログラム150は、起動初期化処理151A、センサデータ取得処理151B、上位制御値取得処理151C、下位制御値算出処理151D及び制御指示処理151Eを含んでいる。また、下位制御プログラム150は、内部監視処理151F、安全確保処理151G及び通信処理151Hを含んでいる。
FIG. 5 is a diagram showing an example of a
起動初期化処理151Aは、ECU2に接続されたセンサ8のデータをマイコン20が取得可能となるように入出力インターフェース204を設定する処理である。起動初期化処理151Aは、マイコン20から駆動回路23へ制御値を出力可能となるように入出力インターフェース204を設定する処理である。
The start-up
起動初期化処理151Aは、下位制御処理に必要な制御処理周期を通知するようにタイマ206を設定する処理である。
The
起動初期化処理151Aは、ECU1からECU2へ送信されるデータを受信可能なように通信インターフェース205を設定する処理である。
The start-up
センサデータ取得処理151Bは、制御処理の各周期において、センサ8のデータを取得する処理である。 The sensor data acquisition process 151B is a process for acquiring the data of the sensor 8 in each cycle of the control process.
上位制御値取得処理151Cは、制御処理の各周期において、ECU1の下位制御指示プログラム121Gが算出した下位制御指示値を通信インターフェース205から取得する処理である。
The upper control value acquisition process 151C is a process of acquiring the lower control instruction value calculated by the lower
下位制御値算出処理151Dは、制御処理の各周期において、センサデータ取得処理151Bにより取得されたセンサ8のデータ及び上位制御値取得処理151Cにより取得された下位制御指示値に基づいて、下位制御値を算出する処理である。 The lower control value calculation process 151D is based on the data of the sensor 8 acquired by the sensor data acquisition process 151B and the lower control instruction value acquired by the upper control value acquisition process 151C in each cycle of the control process. Is the process of calculating.
制御指示処理151Eは、下位制御値算出処理151Dにより算出された下位制御値を駆動回路23へ出力する処理である。
The control instruction process 151E is a process of outputting the lower control value calculated by the lower control value calculation process 151D to the
内部監視処理151Fは、センサデータ取得処理151B、上位制御値取得処理151C、下位制御値算出処理151D及び制御指示処理151Eを監視する処理である。
The
安全確保処理151Gは、内部監視処理151Fが異常を検出した場合、内部監視処理151Fから呼び出され、駆動回路23へ安全な制御値を出力する処理である。
The safety assurance process 151G is a process called from the
通信処理151Hは、通信インターフェース205及び通信線6を介して、ECU1と必要な情報を交換する処理である。
The
図6は、図3の起動初期化処理141Aのうち起動に関する処理を説明するフローチャートである。
FIG. 6 is a flowchart illustrating a process related to activation in the
ステップS11において、CPU102は、起動プログラムリスト121Zを起動処理リスト142Kに読み出す。次に、ステップS11の処理は、ステップS12の処理に進む。
In step S11, the
ステップS12において、CPU102は、デジタル署名の検証に成功したか否かを判定する。CPU102によってデジタル署名の検証に成功していないと判定される場合、ステップS12の処理は、ステップS13の処理に進む。
In step S12, the
ステップS13において、CPU102は、起動失敗時の処理を実行する。次に、ステップS13の処理は、終了する。
In step S13, the
一方、ステップS12において、CPU102によってデジタル署名の検証に成功したと判定される場合、ステップS12の処理は、ステップS14の処理に進む。
On the other hand, if it is determined in step S12 that the digital signature has been successfully verified by the
ステップS14において、CPU102は、監視する処理の分だけ記憶領域をRAM13に確保する。次に、ステップS14の処理は、ステップS15の処理に進む。
In step S14, the
ステップS15において、CPU102は、システムコールテーブル書き換え処理142Jを実行する。システムコールテーブル書き換え処理142Jの詳細な処理手順は、後述される図7に示される。次に、ステップS15の処理は、ステップS16の処理に進む。
In step S15, the
ステップS16において、CPU102は、プログラム監視状態132の自身の要素を初期化する。次に、ステップS16の処理は、ステップS17の処理に進む。
In step S16, the
ステップS17において、CPU102は、INDEXを0に設定する。INDEXは、起動処理リスト142Kの各要素を参照するときに利用されるパラメータである。次に、ステップS17の処理は、ステップS18の処理に進む。
In step S17, the
ステップS18において、CPU102は、起動処理リスト142KのINDEX番目の処理を起動する。次に、ステップS18の処理は、ステップS19の処理に進む。
In step S18, the
ステップS19において、CPU102は、INDEXを+1だけ歩進する。即ち、CPU102は、INDEXを+1だけインクリメントする。次に、ステップS19の処理は、ステップS20の処理に進む。
In step S19, the
ステップS20において、CPU102は、起動する処理数にINDEXが到達したか否かを判定する。CPU102によって起動する処理数にINDEXが到達したと判定される場合、ステップS20の処理は、終了する。一方、CPU102によって起動する処理数にINDEXが到達していないと判定される場合、ステップS20の処理は、ステップS18の処理に戻る。
In step S20, the
図7は、図6のステップS15におけるシステムコールテーブル書き換え処理142Jを説明するフローチャートである。
FIG. 7 is a flowchart illustrating the system call
ステップS31において、CPU102は、INDEXを0に設定する。INDEXは、システムコールテーブル及び旧システムコールテーブル記憶配列142Pのそれぞれの各要素を参照するときに利用されるパラメータである。次に、ステップS31の処理は、ステップS32の処理に進む。
In step S31, the
ステップS32において、CPU102は、旧システムコールテーブル記憶配列142PのINDEX番目の要素にシステムコールテーブルのINDEX番目の要素の開始アドレスを記憶させる。次に、ステップS32の処理は、ステップS33の処理に進む。
In step S32, the
ステップS33において、CPU102は、システムコールテーブルのINDEX番目の要素にシステムコール監視処理142Iの先頭アドレスを書き込む。次に、ステップS33の処理は、ステップS34の処理に進む。
In step S33, the
ステップS34において、CPU102は、INDEXを+1だけインクリメントする。次に、ステップS34の処理は、ステップS35の処理に進む。
In step S34, the
ステップS35において、CPU102は、システムコールテーブルの要素数にINDEXが到達したか否かを判定する。CPU102によってシステムコールテーブルの要素数にINDEXが到達したと判定される場合、ステップS35の処理は、終了する。一方、CPU102によってシステムコールテーブルの要素数にINDEXが到達していないと判定される場合、ステップS35の処理は、ステップS32の処理に戻る。
In step S35, the
図8は、図3の主処理141Bを説明するフローチャートである。
FIG. 8 is a flowchart illustrating the
ステップS41において、CPU102は、異常通知があるか否かを判定する。CPU102によって異常通知があると判定される場合、ステップS41の処理は、ステップS42の処理に進む。
In step S41, the
ステップS42において、CPU102は、異常検知プロセスID記憶配列131からINDEXを求める。次に、ステップS42の処理は、ステップS43の処理に移行する。
In step S42, the
ステップS43において、CPU102は、異常要因判定処理を実行する。異常要因判定処理の詳細な処理手順は、後述される図10に示される。次に、ステップS43の処理は、ステップS41の処理に戻る。
In step S43, the
なお、プロセス間における異常の通知は、OS122によって提供されるプロセス間通信が用いられる。例えば、POSIX仕様で定義されているシグナル若しくはメッセージキュー又は同等の機能が用いられる。POSIXは、Portable Operating System Interfaceの略称である。POSIXは、IEEEが策定したAPI規格である。IEEEは、Institute of Electrical and Electronics Engineersの略称である。
For the notification of the abnormality between the processes, the interprocess communication provided by the
一方、ステップS41において、CPU102によって異常通知がないと判定される場合、ステップS41の処理は、ステップS44の処理に進む。
On the other hand, if it is determined by the
ステップS44において、CPU102は、システムコール1221Aの監視周期になったか否かを判定する。CPU102によってシステムコール1221Aの監視周期になっていないと判定される場合、ステップS44の処理は、ステップS45の処理に進む。
In step S44, the
ステップS45において、CPU102は、スリープする。次に、ステップS45の処理は、ステップS41の処理に戻る。
In step S45, the
なお、スリープは、プログラムのプロセスから異常が通知されるまで、CPU102の実行時間を消費することなく待機する振る舞いである。スリープは、例えば、POSIX仕様で定義されているsleep又はusleepの機能を用いて実施される。スリープする時間は、プログラムの異常を検出してから安全確保処理141Dを完了するまでの時間が許容時間となるように十分に短い時間とする。
Note that the sleep is a behavior of waiting without consuming the execution time of the
一方、ステップS44において、CPU102によってシステムコール1221Aの監視周期になったと判定される場合、ステップS44の処理は、ステップS46の処理に進む。
On the other hand, if it is determined by the
ステップS46において、CPU102は、システムコールテーブル監視処理142Hを実行する。システムコールテーブル監視処理142Hの詳細な処理手順は、後述される図13に示される。次に、ステップS46の処理は、ステップS47の処理に進む。
In step S46, the
ステップS47において、CPU102は、INDEXを0に設定する。INDEXは、プロセスID毎にプログラム監視状態132の各要素を参照するときに利用されるパラメータである。次に、ステップS47の処理は、ステップS48の処理に進む。
In step S47, the
ステップS48において、CPU102は、異常要因判定処理を実行する。異常要因判定処理の詳細な処理手順は、後述される図10に示される。次に、ステップS48の処理は、ステップS49の処理に進む。
In step S48, the
ステップS49において、CPU102は、INDEXを+1だけインクリメントする。次に、ステップS49の処理は、ステップS50の処理に進む。
In step S49, the
ステップS50において、CPU102は、起動する処理数にINDEXが到達したか否かを判定する。CPU102によって起動する処理数にINDEXが到達したと判定される場合、ステップS50の処理は、ステップS51の処理に進む。一方、CPU102によって起動する処理数にINDEXが到達していないと判定される場合、ステップS50の処理は、ステップS48の処理に戻る。
In step S50, the
ステップS51において、CPU102は、タイムスタンプ領域132Pに記憶されている内部監視タイムスタンプを更新する。次に、ステップS51の処理は、ステップS52の処理に進む。
In step S51, the
ステップS52において、CPU102は、認証領域132Zに記憶されているメッセージ認証コードを更新する。次に、ステップS52の処理は、ステップS41の処理に戻る。このようにステップS41の処理に戻ることで、起動監視プログラム121Yの主処理141Bとして処理の実行が継続される。
In step S52, the
図9は、図3の起動初期化処理141Aのうち初期化に関する処理を説明するフローチャートである。ステップS61〜ステップS72の処理が実行されている間は、上記で説明したようにプログラム監視状態132にアクセスする処理であるため、排他制御が実行される。
FIG. 9 is a flowchart illustrating a process related to initialization in the start-up
ステップS61において、CPU102は、フラグ領域132AをFALSEに初期化する。次に、ステップS61の処理は、ステップS62の処理に進む。
In step S61, the
ステップS62において、CPU102は、プログラム毎に異なる初期化を行う。次に、ステップS62の処理は、ステップS63の処理に進む。
In step S62, the
ステップS63において、CPU102は、許容回数領域132Bを初期化する。次に、ステップS63の処理は、ステップS64の処理に進む。
In step S63, the
ステップS64において、CPU102は、監視周期領域132Cを初期化する。次に、ステップS64の処理は、ステップS65の処理に進む。
In step S64, the
ステップS65において、CPU102は、許容周期領域132Dを初期化する。次に、ステップS65の処理は、ステップS66の処理に進む。
In step S65, the
ステップS66において、CPU102は、タイムスタンプ領域132Pを初期化する。次に、ステップS66の処理は、ステップS67の処理に進む。
In step S66, the
ステップS67において、CPU102は、内部監視結果領域132Qを初期化する。次に、ステップS67の処理は、ステップS68の処理に進む。
In step S67, the
ステップS68において、CPU102は、安全確保代行領域132Rに安全確保処理141Dを書き込む。次に、ステップS68の処理は、ステップS69の処理に進む。
In step S68, the
ステップS69において、CPU102は、安全確保処理状態132Sを初期化する。次に、ステップS69の処理は、ステップS70の処理に進む。
In step S69, the
ステップS70において、CPU102は、フラグ領域132AをTRUEに変更する。次に、ステップS70の処理は、ステップS71の処理に進む。
In step S70, the
ステップS71において、CPU102は、メッセージ認証コードを計算する。次に、ステップS71の処理は、ステップS72の処理に進む。
In step S71, the
ステップS72において、CPU102は、認証領域132Zのメッセージ認証コードを更新する。次に、ステップS72の処理は、終了する。
In step S72, the
図10は、図8のステップS43及びステップS48における異常要因判定処理を説明するフローチャートである。異常要因判定処理は、プログラム監視状態132のINDEX番目の要素を確認する。
FIG. 10 is a flowchart illustrating the abnormality factor determination process in steps S43 and S48 of FIG. The abnormality factor determination process confirms the INDEXth element of the
ステップS81において、CPU102は、メッセージ認証コードが正常であるか否かを判定する。CPU102によってメッセージ認証コードが正常でないと判定される場合、ステップS81の処理は、ステップS82の処理に進む。
In step S81, the
ステップS82において、CPU102は、異常要因対処処理を実行する。異常要因対処処理の詳細な処理手順は、後述される図11に示される。次に、ステップS82の処理は、終了する。
In step S82, the
なお、メッセージ認証コードが正常でない場合には、プログラムの完全性は満たされていない。プログラムの完全性が満たされていない場合には、プログラムは改ざんされている可能性がある。改ざんされているプログラムは、悪意のあるプログラムである可能性がある。悪意のあるプログラムであれば、上記で説明したように、無限ループを実行する等の妨害を行う可能性がある。そこで、このような場合に該当するプロセスは、異常要因対処処理によって強制終了させる。 If the message authentication code is not normal, the integrity of the program is not satisfied. If the integrity of the program is not met, the program may have been tampered with. The program that has been tampered with may be a malicious program. A malicious program may interfere with the execution of an infinite loop, as described above. Therefore, the process corresponding to such a case is forcibly terminated by the abnormal cause countermeasure processing.
一方、ステップS81において、CPU102によってメッセージ認証コードが正常であると判定される場合、ステップS81の処理は、ステップS83の処理に進む。
On the other hand, if the
ステップS83において、CPU102は、監視必要フラグがTRUEであるか否かを判定する。CPU102によって監視必要フラグがTRUEでないと判定される場合、ステップS83の処理は、終了する。一方、CPU102によって監視必要フラグがTRUEであると判定される場合、ステップS83の処理は、ステップS84の処理に進む。
In step S83, the
なお、図8のステップS43から異常要因判定処理が呼び出された場合には、プロセス間通信により異常が通知された状態となっている。従って、明らかに監視必要フラグにTRUEが設定されている状態と等価であるため、ステップS83の処理は省略され、ステップS81の処理は、ステップS84に進む。 When the abnormality factor determination process is called from step S43 in FIG. 8, the abnormality is notified by interprocess communication. Therefore, since it is clearly equivalent to the state in which TRUE is set in the monitoring required flag, the process of step S83 is omitted, and the process of step S81 proceeds to step S84.
ステップS84において、CPU102は、システムコール回数記憶配列142Rの各要素が許容回数の範囲内であるか否かを判定する。CPU102によってシステムコール回数記憶配列142Rの各要素が許容回数の範囲内でないと判定された場合、ステップS84の処理は、ステップS82の処理に進む。
In step S84, the
なお、システムコール1221Aの呼び出し回数が許容回数の範囲内でなければ、プロセス間通信が無限ループ内で実行されることにより、本来のプロセスの実行が妨害される状態となる。従って、プロセス間通信の実行を回避するために、起動中のプロセスを再起動させる必要がある。そこで、このような場合に該当するプロセスは、異常要因対処処理によって再起動させる。
If the number of times the
一方、ステップS84において、CPU102によってシステムコール回数記憶配列142Rの各要素が許容回数の範囲内であると判定された場合、ステップS84の処理は、ステップS85の処理に進む。
On the other hand, if it is determined by the
ステップS85において、CPU102は、内部監視タイムスタンプが許容周期の範囲内であるか否かを判定する。CPU102によって内部監視タイムスタンプが許容周期の範囲内でないと判定された場合、ステップS85の処理は、ステップS82の処理に進む。
In step S85, the
なお、内部監視タイムスタンプが許容周期の範囲内でなければ、悪意のあるプログラムが車両システムに侵入し、無限ループ等の妨害を実行した可能性がある。そこで、このような場合に該当するプロセスは、異常要因対処処理によって安全確保処理141Dを実行させる。
If the internal monitoring time stamp is not within the permissible cycle, it is possible that a malicious program has invaded the vehicle system and executed an infinite loop or other interference. Therefore, the process corresponding to such a case executes the
一方、ステップS85において、CPU102によって内部監視タイムスタンプが許容周期の範囲内であると判定された場合、ステップS85の処理は、ステップS86の処理に進む。
On the other hand, if the
ステップS86において、CPU102は、内部監視結果が正常であるか否かを判定する。CPU102によって内部監視結果が正常でないと判定された場合、ステップS86の処理は、ステップS82の処理に進む。
In step S86, the
なお、内部監視結果が正常でなければ、悪意のあるプログラムが車両システムに侵入し、妨害を実行したために、車両の安全に関わる処理が正しく完了しなかった可能性がある。そこで、このような場合に該当する各プロセスは、異常要因対処処理によって安全確保処理141Dをプロセス毎に実行させる。
If the internal monitoring result is not normal, there is a possibility that the processing related to the safety of the vehicle was not completed correctly because a malicious program invaded the vehicle system and executed the interference. Therefore, each process corresponding to such a case causes the
一方、ステップS86において、CPU102によって内部監視結果が正常であると判定された場合、ステップS86の処理は、ステップS87の処理に進む。
On the other hand, if the
ステップS87において、CPU102は、システムコール回数記憶配列142Rの要素をゼロに再設定する。次に、ステップS87の処理は、ステップS88の処理に進む。
In step S87, the
ステップS88において、CPU102は、メッセージ認証コードを更新する。次に、ステップS88の処理は、終了する。
In step S88, the
図11は、図10のステップS82における異常要因対処処理を説明するフローチャートである。 FIG. 11 is a flowchart illustrating the abnormality factor coping process in step S82 of FIG.
ステップS101において、CPU102は、異常要因対処テーブル132Eを参照する。次に、ステップS101の処理は、ステップS102の処理に進む。
In step S101, the
ステップS102において、CPU102は、対処の値を判定する。ここで、異常要因対処テーブル132Eには、対処の値としてVALが設定されている。VALは、対処の値が入力されたパラメータである。
In step S102, the
具体的には、ステップS81の処理からステップS82の処理を経て異常要因対処処理が呼び出された場合には、CPU102は、プロセスを強制終了させる対処の値としてVALが1に設定されている処理を選択する。従って、ステップS102の処理は、ステップS103の処理に進む。
Specifically, when the abnormal factor coping process is called from the process of step S81 to the process of step S82, the
ステップS103において、CPU102は、該当するプロセスIDのプロセスを強制終了する。次に、ステップS103の処理は、終了する。なお、CPU102は、強制終了する前に、該当するプロセスIDのプロセスに対し、終了を要求し、この要求に一定時間以内に応じない場合に強制終了するようにしてもよい。
In step S103, the
また、ステップS84の処理からステップS82の処理を経て異常要因対処処理が呼び出された場合には、CPU102は、プロセスを再起動させる対処の値としてVALが2に設定されている処理を選択する。従って、ステップS102の処理は、ステップS104の処理に進む。
Further, when the abnormality factor coping process is called from the process of step S84 through the process of step S82, the
ステップS104において、CPU102は、該当するプロセスIDのプロセスを強制終了する。次に、ステップS104の処理は、ステップS105の処理に進む。
In step S104, the
ステップS105において、CPU102は、該当するプロセスIDのプロセスを起動する。次に、ステップS105の処理は、ステップS106の処理に進む。
In step S105, the
ステップS106において、CPU102は、プロセスID記憶配列142Lを更新する。具体的には、該当するプロセスIDのプロセスを強制終了後に起動させた場合、同じプログラムに対応するプロセスが起動するが、プロセスIDはOS122により新たに付与される。そこで、新たに付与されたプロセスIDをプロセスID記憶配列142Lに記憶させることにより、CPU102は、プロセスID記憶配列142Lを更新する。
In step S106, the
次に、ステップS106の処理は、終了する。 Next, the process of step S106 ends.
また、ステップS85の処理からステップS82の処理へ経て異常要因対処処理が呼び出された場合には、以下の処理が実行される。即ち、CPU102は、プログラムの一部の実行状態に該当するプロセスによって安全確保処理141Dを実行させる対処の値としてVALが3に設定されている処理を選択する。従って、ステップS102の処理は、ステップS107の処理に進む。
Further, when the abnormality factor coping process is called from the process of step S85 to the process of step S82, the following process is executed. That is, the
ステップS107において、CPU102は、安全確保処理141Dを実行する。安全確保処理141Dの詳細な処理手順は、後述される図12に示される。
In step S107, the
次に、ステップS107の処理は、終了する。 Next, the process of step S107 ends.
また、ステップS86の処理からステップS82の処理へ経て異常要因対処処理が呼び出された場合には、以下の処理が実行される。即ち、CPU102は、プログラムに含まれる各命令群の実行状態に該当する各プロセスによって安全確保処理141Dをプロセス毎に実行させる対処の値としてVALが4に設定されている処理を選択する。従って、ステップS102の処理は、ステップS108の処理に進む。
Further, when the abnormality factor coping process is called from the process of step S86 to the process of step S82, the following process is executed. That is, the
ステップS108において、CPU102は、INDEXを0に設定する。INDEXは、プロセスID記憶配列142Lの各要素を参照するときに利用されるパラメータである。次に、ステップS108の処理は、ステップS109の処理に進む。
In step S108, the
ステップS109において、CPU102は、プロセスID記憶配列142LのINDEX番目の要素のプロセスIDを取得する。次に、ステップS109の処理は、ステップS110の処理に進む。
In step S109, the
ステップS110において、CPU102は、安全確保処理141Dを実行する。次に、ステップS110の処理は、ステップS111の処理に進む。
In step S110, the
ステップS111において、CPU102は、INDEXを+1だけインクリメントする。次に、ステップS111の処理は、ステップS112の処理に進む。
In step S111, the
ステップS112において、CPU102は、プロセスID記憶配列142Lの要素数にINDEXが到達したか否かを判定する。CPU102によってプロセスID記憶配列142Lの要素数にINDEXが到達したと判定される場合、ステップS112の処理は、終了する。一方、CPU102によってプロセスID記憶配列142Lの要素数にINDEXが到達していないと判定される場合、ステップS112の処理は、ステップS109の処理に戻る。
In step S112, the
なお、CPU102は、ステップS102において対処の値を選ぶとき、他のプロセスから受信したデータに異常があり、一時的に自身のプロセスを実行できない状態になっていることがある。この場合には、ステップS102の処理は、終了する。
When the
図12は、図11のステップS107及びステップS110における図3の安全確保処理141Dを説明するフローチャートである。
FIG. 12 is a flowchart illustrating the
ステップS121において、CPU102は、プロセスID記憶配列142Lから異常と判定されたプロセスIDのINDEXを求める。次に、ステップS121の処理は、ステップS122の処理に進む。
In step S121, the
ステップS122において、CPU102は、時間がタイムアウト時間に到達したか否かを判定する。タイムアウト時間は、異常が検知されてから安全確保処理141Dを完了するまでの許容時間である。
In step S122, the
ステップS122において、CPU102によって時間がタイムアウト時間に到達したと判定される場合、ステップS122の処理は、ステップS123の処理に進む。
If the
ステップS123において、CPU102は、異常停止する。次に、ステップS123の処理は、終了する。
In step S123, the
一方、ステップS122において、CPU102によって時間がタイムアウト時間に到達していないと判定される場合には、ステップS122の処理は、ステップS124の処理に進む。
On the other hand, if the
ステップS124において、CPU102は、安全確保処理状態132SのINDEX番目の要素が未実施の値であるか否かを判定する。CPU102によって安全確保処理状態132SのINDEX番目の要素が未実施の値であると判定される場合、ステップS124の処理は、ステップS125の処理に進む。
In step S124, the
ステップS125において、CPU102は、プロセスID記憶配列142Lの全要素のプロセスIDに安全確保代行要求を通知する。通知は、OS122が提供するプロセス間通信を利用する。次に、ステップS125の処理は、ステップS122の処理に戻る。
In step S125, the
一方、ステップS124において、CPU102によって安全確保処理状態132SのINDEX番目の要素が未実施の値でないと判定される場合、ステップS124の処理は、ステップS126の処理に進む。
On the other hand, in step S124, when the
ステップS126において、CPU102は、安全確保処理状態132SのINDEX番目の要素が実施完了の値であるか否かを判定する。CPU102によって安全確保処理状態132SのINDEX番目の要素が実施完了の値であると判定される場合、ステップS126の処理は、終了する。
In step S126, the
一方、ステップS126において、CPU102によって安全確保処理状態132SのINDEX番目の要素が実施完了の値でないと判定される場合、ステップS126の処理は、ステップS122の処理に戻る。
On the other hand, in step S126, when the
なお、図11のステップS107又は図11のステップS110から安全確保処理141Dが呼び出された場合には、一つの異常の対処を終えてから次の異常の対処を行う手順となる。従って、後に行われる異常の対処の開始が遅くなる可能性がある。この遅れを小さくするためには、発生する異常毎に、起動監視プログラム121YがOS122の機能を利用してスレッドを新たに作成する。これにより、そのスレッドに安全確保処理141Dが割り当てられる。
When the
換言すれば、プロセスは、プログラムの実行状態であって、プログラムの実行単位であるが、スレッドは、CPU102の割り当て実行単位であるため、スレッドを利用することによりハードウェア資源をさらに効率良く利用することができる。
In other words, the process is the execution state of the program and is the execution unit of the program, but since the thread is the allocation execution unit of the
図13は、図8のステップS46における図3のシステムコールテーブル監視処理142Hを説明するフローチャートである。
FIG. 13 is a flowchart illustrating the system call
ステップS141において、CPU102は、INDEXを0に設定する。次に、ステップS141の処理は、ステップS142の処理に進む。
In step S141, the
ステップS142において、CPU102は、システムコールテーブルのINDEX番目の要素がシステムコール監視処理142Iの開始アドレスを記憶しているか否かを判定する。CPU102によってシステムコールテーブルのINDEX番目の要素がシステムコール監視処理142Iの開始アドレスを記憶していないと判定される場合、ステップS142の処理は、ステップS143の処理に進む。
In step S142, the
ステップS143において、CPU102は、異常要因対処処理を実行する。次に、ステップS143の処理は、終了する。
In step S143, the
一方、ステップS142において、CPU102によってシステムコールテーブルのINDEX番目の要素がシステムコール監視処理142Iの開始アドレスを記憶していると判定される場合、ステップS142の処理は、ステップS144の処理に進む。
On the other hand, if it is determined by the
ステップS144において、CPU102は、INDEXを+1だけインクリメントする。次に、ステップS144の処理は、ステップS145の処理に進む。
In step S144, the
ステップS145において、CPU102は、システムコールテーブルの要素数にINDEXが到達したか否かを判定する。CPU102によってシステムコールテーブルの要素数にINDEXが到達したと判定される場合、ステップS145の処理は、終了する。一方、CPU102によってシステムコールテーブルの要素数にINDEXが到達していないと判定される場合、ステップS145の処理は、ステップS142の処理に戻る。
In step S145, the
なお、システムコールテーブルの各要素にシステムコール監視処理142Iの開始アドレスが記憶されていない場合には、悪意のあるプログラムが侵入したことが隠蔽されている可能性がある。悪意のあるプログラムが侵入したことを隠蔽するために、特定のシステムコール1221Aの実行結果を偽るプロセスのアドレスがシステムコールテーブルに書き込まれる場合がある。この場合には、異常要因対処処理が呼び出され、該当するプロセスIDのプロセスが強制終了される。
If the start address of the system call monitoring process 142I is not stored in each element of the system call table, it is possible that a malicious program has invaded. In order to hide the intrusion of a malicious program, the address of a process that falsifies the execution result of a
図14は、図3のシステムコール監視処理142Iを説明するフローチャートである。ここで、各システムコール1221Aは、システムコール番号が順に関連付けられている。システムコール番号は、例えば、自然数が昇順に割り当てられている。システムコール番号は、OS122の実装によって異なっている。従って、OS122が同一であれば、システムコール番号により任意のシステムコール1221Aを特定することができる。
FIG. 14 is a flowchart illustrating the system call monitoring process 142I of FIG. Here, each
ステップS161において、CPU102は、システムコール番号をSYSCNに設定する。SYSCNは、旧システムコールテーブル記憶配列142P及びシステムコール回数記憶配列142Rのそれぞれにおいてシステムコール番号により任意のシステムコール1221Aを参照するためのパラメータである。次に、ステップS161の処理は、ステップS162の処理に進む。
In step S161, the
ステップS162において、CPU102は、システムコール1221Aの呼び出し元のプロセスのプロセスIDを取得する。次に、ステップS162の処理は、ステップS163の処理に進む。
In step S162, the
ステップS163において、CPU102は、プロセスIDに対応するシステムコール回数記憶配列142Rを選択する。次に、ステップS163の処理は、ステップS164の処理に進む。
In step S163, the
ステップS164において、CPU102は、システムコール回数記憶配列142RのSYSCN番目の呼び出し回数を+1だけインクリメントする。次に、ステップS164の処理は、ステップS165の処理に進む。
In step S164, the
ステップS165において、CPU102は、プロセスIDに対応する許容回数領域132Bを選択する。次に、ステップS165の処理は、ステップS166の処理に進む。
In step S165, the
ステップS166において、CPU102は、許容回数領域132Bの許容回数を選択する。次に、ステップS166の処理は、ステップS167の処理に進む。
In step S166, the
ステップS167において、CPU102は、SYSCN番目の呼び出し回数が許容回数の範囲内であるか否かを判定する。CPU102によってSYSCN番目の呼び出し回数が許容回数の範囲内でないと判定される場合、ステップS167の処理は、ステップS168の処理に進む。
In step S167, the
ステップS168において、CPU102は、異常要因対処処理を実行する。次に、ステップS168の処理は、終了する。
In step S168, the
一方、ステップS167において、CPU102によってSYSCN番目の呼び出し回数が許容回数の範囲内であると判定される場合、ステップS167の処理は、ステップS169の処理に進む。
On the other hand, if the
ステップS169において、CPU102は、プロセスIDに対応する旧システムコールテーブル記憶配列142Pを選択する。次に、ステップS169の処理は、ステップS170の処理に進む。
In step S169, the
ステップS170において、CPU102は、旧システムコールテーブル記憶配列142PのSYSCN番目に記憶されている開始アドレスを取得する。次に、ステップS170の処理は、ステップS171の処理に進む。
In step S170, the
ステップS171において、CPU102は、PCに開始アドレスを設定する。PCは、Program Counterの略称である。次に、ステップS171の処理は、終了する。これにより、CPU102は、PCを参照してシステムコール1221Aを呼び出すことができる。
In step S171, the
なお、システムコール監視処理142Iは、システムコール番号をOS122から取得できることを前提としているが、OS122の実装によってはシステムコール番号の取得ができないことがある。この場合には、CPU102は、システムコール監視処理142Iが呼び出される前の呼び出し元のプロセスのプロセスIDと、OS122の管理情報又はハードウェア資源のコンピュータアーキテクチャから取得可能な情報を参照して特定する。なお、OS122の管理情報又はハードウェア資源のコンピュータアーキテクチャから取得可能な情報は、例えば、システムコール監視処理142Iが呼び出される前の呼び出し元のプロセスを管理するスタックポインタ又はシステムコールの開始番地である。
The system call monitoring process 142I is premised on the fact that the system call number can be acquired from the
図15は、図3の主処理141Bから呼び出される各種処理を説明するフローチャートである。
FIG. 15 is a flowchart illustrating various processes called from the
ステップS181において、CPU102は、内部監視処理141Cを呼び出す。次に、ステップS181の処理は、ステップS182の処理に進む。
In step S181, the
ステップS182において、CPU102は、内部監視結果に異常が有るか否かを判定する。CPU102によって内部監視結果に異常が有ると判定される場合、ステップS182の処理は、ステップS183の処理に進む。
In step S182, the
ステップS183において、CPU102は、内部監視結果を異常値に更新する。次に、ステップS183の処理は、ステップS184の処理に進む。
In step S183, the
ステップS184において、CPU102は、安全確保処理状態132Sの要素を実施開始に変更する。次に、ステップS184の処理は、ステップS185の処理に進む。
In step S184, the
ステップS185において、CPU102は、安全確保処理141Dを実行する。次に、ステップS185の処理は、ステップS186の処理に進む。
In step S185, the
ステップS186において、CPU102は、安全確保処理状態132Sの要素を実施完了に変更する。次に、ステップS186の処理は、ステップS187の処理に進む。
In step S186, the
ステップS187において、CPU102は、監視必要フラグをFALSEに変更する。次に、ステップS187の処理は、ステップS188の処理に進む。
In step S187, the
ステップS188において、CPU102は、処理を終了する。次に、ステップS188の処理は、ステップS189の処理に進む。
In step S188, the
ステップS189において、CPU102は、起動初期化処理141Aを呼び出す。次に、ステップS189の処理は、終了する。
In step S189, the
一方、ステップS182において、CPU102によって内部監視結果に異常が無いと判定される場合、ステップS182の処理は、ステップS190の処理に進む。
On the other hand, if the
ステップS190において、CPU102は、内部監視タイムスタンプが許容周期の範囲内であるか否かを判定する。CPU102によって内部監視タイムスタンプが許容周期の範囲内でないと判定される場合、ステップS190の処理は、ステップS191の処理に進む。
In step S190, the
ステップS191において、CPU102は、安全確保処理141Dを呼び出す。次に、ステップS191の処理は、ステップS192の処理に進む。
In step S191, the
ステップS192において、CPU102は、スリープする。次に、ステップS192の処理は、ステップS191に戻る。ここで、スリープは、図8のステップS45のスリープと同様に実行される。
In step S192, the
一方、ステップS190において、CPU102によって内部監視タイムスタンプが許容周期の範囲内であると判定される場合、ステップS190の処理は、ステップS193の処理に進む。
On the other hand, in step S190, when the
ステップS193において、CPU102は、内部監視タイムスタンプを更新する。次に、ステップS193の処理は、終了する。
In step S193, the
図16は、図5の下位制御プログラム150に含まれる起動初期化処理151Aを説明するフローチャートである。なお、マイコン20にはOS122と同等のオペレーティングシステムは搭載しないため、図2のシステムコール1221Aに関する処理は実行されない。また、ECU2に接続されているモータ7の電源の遮断をECU1から実行できるように配線がされている場合には、安全確保処理141Dにより一部の動作を代行することができる。
FIG. 16 is a flowchart illustrating the
ステップS201〜ステップS208の処理は、ハードウェア資源が異なる以外、図9のステップS61、ステップS62、ステップS65〜ステップS67、ステップS70〜ステップS72の処理と同様である。よって、その詳細な説明は省略される。 The processing of steps S201 to S208 is the same as the processing of steps S61, S62, S65 to S67, and steps S70 to S72 in FIG. 9, except that the hardware resources are different. Therefore, the detailed description thereof will be omitted.
一般的に、OS122は、プロセスが呼び出したシステムコール1221A等のAPI1221の機能を提供する場合、プロセスからAPI1221に渡されたパラメータに異常がないか否かをチェックする。この結果、OS122は、パラメータに異常があることを検出した場合、API1221の本来の機能を実行せずに、API1221を呼び出したプロセスに対してパラメータに異常がある旨を伝える。
Generally, when the
しかし、例えば、バッファのオーバーフローを発生させるような悪意のあるプログラムは、OS122によるパラメータのチェックでは検出されない。この結果、バッファのオーバーフローが発生すれば、無限ループ等のように本来の処理とは異なる処理が実行される。これにより、CPUリソースがなくなるため、CPU102は、各種プログラムを実行することができない。このため、ECU1は、各種プログラムに基づいて車両を適切に制御することできないため、車両は想定通りに動作しなくなる。
However, for example, a malicious program that causes a buffer overflow is not detected by the parameter check by the
また、例えば、不要なデータを他のECUに絶え間なく送信するような悪意のあるプログラムも、OS122によるパラメータのチェックでは検出されない。この結果、他のECUは車両の制御に必要な通信データを受信できない。これにより、複数のECUによって連係して車両を適切に制御することができなくなる。このため、車両の制御処理が実質的に無効化される。
Further, for example, a malicious program that continuously transmits unnecessary data to another ECU is not detected by the parameter check by the
このように、悪意のあるプログラムは、システムコール1221Aの呼び出し状況を通常想定される状況と異なる状況に陥れる。不要なデータを他のECUに絶え間なく送信するような悪意のあるプログラムも同様である。
In this way, the malicious program falls into a situation in which the call status of the
そこで、CPU102は、プログラムの実行状態であるプロセスにより想定されるシステムコール1221Aの呼び出し状況に基づいて、プログラムに悪意があるか否かを判定する。従って、悪意のあるプログラムの実行を事前に回避することができる。これにより、悪意のあるプログラムによって車両システムが妨害された状態でも車両の稼働を継続させることができる。
Therefore, the
また、CPU102は、プログラムの実行状態であるプロセスにより想定される処理結果に基づいて、プロセスの継続、プロセスの終了及びプロセスの再起動のいずれか1つを実行する。従って、プロセス毎に適した処理が実行される。これにより、プログラムに悪意があると判定される場合に一律に同じ処理をするよりも適した処理を実行することができる。
Further, the
また、CPU102は、複数のプロセスが生成されている場合、各プロセスのうち、悪意があるプロセスを終了する。CPU102は、複数のプロセスが生成されている場合、各プロセスのうち、悪意がないプロセスを継続する。従って、プログラムにある悪意に応じてプロセスの終了及び継続のいずれか一方を選択することができる。これにより、安全を確保しつつ、車両の運転を継続させることができる。
Further, when a plurality of processes are generated, the
また、CPU102は、複数の電装品が入出力インターフェース101に接続されている場合、各電装品に対応するプログラム毎に悪意があるか否かを判定する。従って、各電装品の機能に応じて悪意の有無を判定することができる。これにより、複数のプログラムのうち、悪意のあるプログラムを特定することが容易となるため、強制終了させるべきプログラムを細かく特定することができる。
Further, when a plurality of electrical components are connected to the input /
また、CPU102は、予め設定された許容周期内にシステムコール1221Aが呼び出され、システムコール1221Aの呼び出し回数がプロセスの想定通りであって、監視プロセスの戻り値がエラー値以外である場合、プログラムに悪意がないと判定する。従って、プログラムのアルゴリズムが仕様に照らして正しいか否かに基づいて、プログラムに悪意があるか否かが判定される。これにより、プログラムの実行状態であるプロセスが停止することを担保することができる。
Further, when the
また、CPU102は、システムコール1221Aの開始アドレスが正しく設定されている場合、プログラムに悪意がないと判定する。従って、CPU102は、システムコール1221Aの開始アドレスが正しく設定されていない場合、プログラムに悪意があると判定する。これにより、悪意のあるプログラムによって書き換えられたシステムコール1221Aの開始アドレスの参照先におけるプロセスの呼び出しを防ぐことができる。
Further, the
また、CPU102は、システムコール1221Aの呼び出し回数が予め設定された許容回数の範囲内である場合、プログラムに悪意がないと判定する。従って、CPU102は、システムコール1221Aの呼び出し回数が予め設定された許容回数の範囲外である場合、プログラムに悪意があると判定する。これにより、プロセス間通信が無限ループで実行されることによりシステムコール1221Aの呼び出し回数が異常に増加した場合、プログラムに悪意があると判定して次の処理を進めることができる。
Further, the
また、CPU102は、プロセス毎に想定される呼び出し回数を計測してからシステムコール1221Aを呼び出す。従って、CPU102は、プロセス毎に想定される呼び出し回数を計測するまではシステムコール1221Aを実際に呼び出さない。これにより、悪意のあるプログラムの実行状態であるプロセスの実行を回避させることができる。
Further, the
また、CPU102は、プログラムに悪意がないと判定する場合、メッセージ認証コードを生成する。従って、ECU1とECU2との間で各種信号を通信する際、通信される各種信号の改ざん及びなりすましを防止することができる。これにより、通信の安全性を担保することができる。
Further, the
また、CPU102は、プロセスIDにメッセージ認証コードを関連付けた状態で、プロセスIDとメッセージ認証コードとを共有メモリに記憶させる。従って、プロセスIDに対応するプロセスが改ざん及びなりすましが行われていないことを証明することができる。これにより、悪意のないプログラムの実行状態であるプロセスを実行することができる。
Further, the
なお、安全確保処理141D及びプログラム監視状態132を更新及び参照する本来のプロセスではない、第三者のプロセスによるなりすましに対応する必要がある場合は、安全確保処理141D及びプログラム監視状態132の改ざんの検出にメッセージ認証を使用する代わりにデジタル署名を使用してもよく、デジタル署名の公開鍵に危殆化の恐れがある場合は、鍵を定期的に更新しても良い。また、鍵の更新の際に公開鍵証明書及び公開鍵基盤(Public Key Infrastructure)又はこれに準じた仕組みを利用しても良い。
If it is necessary to deal with spoofing by a third-party process that is not the original process for updating and referencing the
また、各実施の形態について、車載制御装置を実行するための処理回路が備えられている。処理回路は、専用のハードウェアであっても、メモリに格納されるプログラムを実行するCPU(Central Processing Unit、中央処理装置、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータ、プロセッサ、DSPともいう)であってもよい。 Further, for each embodiment, a processing circuit for executing the in-vehicle control device is provided. Even if the processing circuit is dedicated hardware, it is also called a CPU (Central Processing Unit, central processing unit, processing unit, arithmetic unit, microprocessor, microprocessor, processor, DSP) that executes a program stored in the memory. It may be.
図17は、ハードウェア構成例を説明する図である。図17においては、処理回路401がバス402に接続されている。処理回路401が専用のハードウェアである場合、処理回路401は、例えば、単一回路、複合回路、プログラム化したプロセッサ、ASIC、FPGA又はこれらを組み合わせたものが該当する。車載制御装置の各部の機能のそれぞれは、処理回路401で実現されてもよいし、各部の機能はまとめて処理回路401で実現されてもよい。
FIG. 17 is a diagram illustrating a hardware configuration example. In FIG. 17, the
図18は、他のハードウェア構成例を説明する図である。図18においては、プロセッサ403及びメモリ404がバス402に接続されている。処理回路がCPUの場合、車載制御装置の各部の機能は、ソフトウェア、ファームウェア又はソフトウェアとファームウェアとの組み合わせにより実現される。ソフトウェア又はファームウェアはプログラムとして記述され、メモリ404に格納される。処理回路は、メモリ404に記憶されたプログラムを読み出して実行することにより、各部の機能を実現する。すなわち、車載制御装置は、処理回路により実行されるときに、ステップが結果的に実行されることになるプログラムを格納するためのメモリ404を備えている。また、これらのプログラムは、実行する手順又は方法をコンピュータに実行させるものであるといえる。ここで、メモリ404とは、RAM、ROM、フラッシュメモリ、EPROM、EEPROM等の、不揮発性若しくは揮発性の半導体メモリ又は、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ミニディスク、DVD等が該当する。
FIG. 18 is a diagram illustrating another hardware configuration example. In FIG. 18, the
なお、車載制御装置の各部の機能は、一部が専用のハードウェアで実現され、他の一部がソフトウェア又はファームウェアで実現されるようにしてもよい。例えば、専用のハードウェアとしての処理回路で各機能を実現させることができる。また、処理回路がメモリ404に格納されたプログラムを読み出して実行することによって各機能を実現させることが可能である。
It should be noted that the functions of each part of the in-vehicle control device may be partially realized by dedicated hardware and the other part may be realized by software or firmware. For example, each function can be realized by a processing circuit as dedicated hardware. Further, each function can be realized by the processing circuit reading and executing the program stored in the
このように、処理回路は、ハードウェア、ソフトウェア、ファームウェア又はこれらの組み合わせによって、上記の各機能を実現することができる。 As described above, the processing circuit can realize each of the above functions by hardware, software, firmware, or a combination thereof.
実施の形態においては、ECU1がECU2のみに接続されている一例について説明したが、特にこれに限定されるものではない。例えば、ECU1が2つ以上の他のECUに接続されていてもよい。従って、実施の形態と同様にプログラムに悪意があるか否かを判定することによって、車両の稼働を継続させることができる。
In the embodiment, an example in which the
1,2 ECU、3 カメラ、4 レーダー、5 ディスプレイ、6 通信線、7 モータ、8 センサ、10 SoC、101 入出力インターフェース、102 CPU、103 メモリインターフェース、104 HSM、105 ROM、106 タイマ、107 通信インターフェース、12 二次記憶装置、121 上位制御プログラム、122 OS、1221 API、1221A システムコール、1221B ライブラリ、1222 カーネル、1223 カーネルモジュール、121B カメラデータ取得プログラム、121C 画像変換プログラム、121D 画像認識プログラム、121E 画像状況判定プログラム、121F 総合状況判定プログラム、121G 下位制御指示プログラム、121H 通信プログラム、121J レーダーデータ取得プログラム、121K レーダーデータ変換プログラム、121L レーダーデータ認識プログラム、121M レーダー状況判定プログラム、121N ディスプレイ表示プログラム、121Y 起動監視プログラム、121Z 起動プログラムリスト、121ZA 記憶場所、121ZB デジタル署名領域、13 RAM、131 異常検知プロセスID記憶配列、132 プログラム監視状態、132A フラグ領域、132B 許容回数領域、132C 監視周期領域、132D 許容周期領域、132E 異常要因対処テーブル、132P タイムスタンプ領域、132Q 内部監視結果領域、132R 安全確保代行領域、132S 安全確保処理状態、132Z 認証領域、140 上位制御プロセス、141 共通処理、141A 起動初期化処理、141B 主処理、141C 内部監視処理、141D 安全確保処理、141E プロセス間通信処理、141F ECU間通信処理、142 特有処理、142H システムコールテーブル監視処理、142I システムコール監視処理、142J システムコールテーブル書き換え処理、142K 起動処理リスト、142L プロセスID記憶配列、142P 旧システムコールテーブル記憶配列、142R システムコール回数記憶配列、150 下位制御プログラム、151A 起動初期化処理、151B センサデータ取得処理、151C 上位制御値取得処理、151D 下位制御値算出処理、151E 制御指示処理、151F 内部監視処理、151G 安全確保処理、151H 通信処理、20 マイコン、201 CPU、202 RAM、203 ROM、204 入出力インターフェース、205 通信インターフェース、206 タイマ、22 入力回路、23 駆動回路。 1, 2, ECU, 3 camera, 4 radar, 5 display, 6 communication lines, 7 motors, 8 sensors, 10 SoC, 101 input / output interface, 102 CPU, 103 memory interface, 104 HSM, 105 ROM, 106 timer, 107 communication Interface, 12 secondary storage, 121 upper control program, 122 OS, 1221 API, 1221A system call, 1221B library, 1222 kernel, 1223 kernel module, 121B camera data acquisition program, 121C image conversion program, 121D image recognition program, 121E Image status judgment program, 121F comprehensive status judgment program, 121G lower control instruction program, 121H communication program, 121J radar data acquisition program, 121K radar data conversion program, 121L radar data recognition program, 121M radar status judgment program, 121N display display program, 121Y startup monitoring program, 121Z startup program list, 121ZA storage location, 121ZB digital signature area, 13 RAM, 131 abnormality detection process ID storage array, 132 program monitoring status, 132A flag area, 132B allowable number of times area, 132C monitoring cycle area, 132D Allowable cycle area, 132E error factor handling table, 132P time stamp area, 132Q internal monitoring result area, 132R security agency area, 132S security processing status, 132Z authentication area, 140 upper control process, 141 common processing, 141A startup initialization Processing, 141B main processing, 141C internal monitoring processing, 141D security processing, 141E inter-process communication processing, 141F inter-ECU communication processing, 142-specific processing, 142H system call table monitoring processing, 142I system call monitoring processing, 142J system call table rewriting Processing, 142K startup processing list, 142L process ID storage array, 142P old system call table storage array, 142R system call count storage array, 150 lower control program, 151A startup initialization processing, 151 B Sensor data acquisition processing, 151C upper control value acquisition processing, 151D lower control value calculation processing, 151E control instruction processing, 151F internal monitoring processing, 151G safety assurance processing, 151H communication processing, 20 microcomputers, 201 CPU, 202 RAM, 203 ROM , 204 I / O interface, 205 communication interface, 206 timer, 22 input circuit, 23 drive circuit.
Claims (9)
前記プログラムの実行状態であるプロセスにより想定される前記システムコールの呼び出し状況に基づいて、前記プログラムに悪意があるか否かを判定するCPUと、
を備え、
前記CPUは、予め設定された許容周期内に前記プログラムに含まれる複数の処理部分が呼び出され、前記複数の処理部分の実行順序が前記プログラムの仕様通りであって、前記プロセスのうち前記複数の処理部分を監視する監視プロセスの戻り値がエラー値以外である場合、前記プログラムに悪意がないと判定する車載制御装置。 It stores an operating system including a kernel that manages an input / output interface and a system call that calls a function of the kernel, and a program that controls electrical components connected to the input / output interface by calling the system call. With a secondary storage device,
A CPU that determines whether or not the program is malicious based on the call status of the system call assumed by the process that is the execution state of the program.
Equipped with
In the CPU, a plurality of processing portions included in the program are called within a preset allowable cycle, the execution order of the plurality of processing portions is as specified in the program, and the plurality of processing portions in the process are executed. An in-vehicle control device that determines that the program is not malicious when the return value of the monitoring process that monitors the processing portion is other than the error value.
をさらに備え、
前記CPUは、前記プロセスの識別子となるプロセスIDに前記メッセージ認証コードを関連付けた状態で、前記プロセスIDと前記メッセージ認証コードとを前記共有メモリに記憶させる請求項8に記載の車載制御装置。 With more shared memory
Wherein the CPU, before in a state of associating the message authentication code to the process ID of the Kipu process identifier, vehicle control apparatus according to claim 8 for storing said message authentication code and the process ID in the shared memory ..
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020009571A JP6976365B2 (en) | 2020-01-24 | 2020-01-24 | In-vehicle control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020009571A JP6976365B2 (en) | 2020-01-24 | 2020-01-24 | In-vehicle control device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021117624A JP2021117624A (en) | 2021-08-10 |
JP6976365B2 true JP6976365B2 (en) | 2021-12-08 |
Family
ID=77174950
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020009571A Active JP6976365B2 (en) | 2020-01-24 | 2020-01-24 | In-vehicle control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6976365B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2614272A (en) * | 2021-12-23 | 2023-07-05 | Continental Automotive Tech Gmbh | Secure automotive system |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004126854A (en) * | 2002-10-01 | 2004-04-22 | Mitsubishi Electric Corp | Attack countermeasure system |
JP2007072969A (en) * | 2005-09-09 | 2007-03-22 | Ntt Docomo Inc | Operation history protection device and operation history protection program |
JP5081480B2 (en) * | 2007-03-28 | 2012-11-28 | 株式会社エヌ・ティ・ティ・ドコモ | Software behavior modeling device, software behavior modeling method, software behavior verification device, and software behavior verification method |
JP2012043322A (en) * | 2010-08-23 | 2012-03-01 | Kddi Corp | Software misappropriation detecting device, software misappropriation detecting method, and program |
JP2016060328A (en) * | 2014-09-17 | 2016-04-25 | 株式会社デンソー | In-vehicle system |
US10482240B2 (en) * | 2015-01-29 | 2019-11-19 | Nec Corporation | Anti-malware device, anti-malware system, anti-malware method, and recording medium in which anti-malware program is stored |
RU2628921C1 (en) * | 2016-03-18 | 2017-08-22 | Акционерное общество "Лаборатория Касперского" | System and method for performing anti-virus scan of file on virtual machine |
JP2018147444A (en) * | 2017-03-09 | 2018-09-20 | 株式会社日立製作所 | Computer system for executing analysis program and method for monitoring execution of analysis program |
JP2019016007A (en) * | 2017-07-03 | 2019-01-31 | クラリオン株式会社 | On-vehicle apparatus, application execution system and access method to important information |
JP6919475B2 (en) * | 2017-09-29 | 2021-08-18 | 富士通株式会社 | Detection programs, devices, and methods |
-
2020
- 2020-01-24 JP JP2020009571A patent/JP6976365B2/en active Active
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2614272A (en) * | 2021-12-23 | 2023-07-05 | Continental Automotive Tech Gmbh | Secure automotive system |
Also Published As
Publication number | Publication date |
---|---|
JP2021117624A (en) | 2021-08-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2720068C2 (en) | Information processing device, method for control thereof and data storage medium | |
JP6678548B2 (en) | Relay device, relay method and program | |
US8413230B2 (en) | API checking device and state monitor | |
US8931086B2 (en) | Method and apparatus for reducing false positive detection of malware | |
US9569620B2 (en) | Method for processing UEFI protocols and system therefor | |
US8122514B2 (en) | Software enhanced trusted platform module | |
US20050132031A1 (en) | Method and system for measuring status and state of remotely executing programs | |
JP5346608B2 (en) | Information processing apparatus and file verification system | |
US20200150973A1 (en) | Providing a trustworthy indication of the current state of a multi-processor data processing apparatus | |
EP3678025B1 (en) | Computer code integrity checking | |
JP6976365B2 (en) | In-vehicle control device | |
US11449602B1 (en) | Systems and methods for generating trust binaries | |
US9448888B2 (en) | Preventing a rollback attack in a computing system that includes a primary memory bank and a backup memory bank | |
EP4182820B1 (en) | Computing device for establishing a trusted execution environment | |
CN114281068A (en) | Unmanned equipment remote take-over system, method, device, equipment and storage medium | |
US20210073397A1 (en) | Computing device and method for operating same | |
KR20200067744A (en) | Bootloader verification extension method | |
CN115461742A (en) | Method and apparatus for securely launching container instances | |
CN113419905A (en) | Method and device for realizing credible verification and security module | |
CN114443147B (en) | Trusted hardware technology-based super monitoring type unmanned aerial vehicle trusted detection method | |
CN112988262B (en) | Method and device for starting application program on target platform | |
US11847227B2 (en) | Firmware version corruption attack prevention | |
US11295005B2 (en) | Information processing apparatus capable of detecting alteration, method for controlling information processing apparatus, and storage medium | |
JP6698778B2 (en) | Control system | |
WO2024070044A1 (en) | Verification system, verification method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200124 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210406 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210527 |
|
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: 20211012 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211109 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6976365 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |