JP2014236248A - Electronic control device and electronic control system - Google Patents

Electronic control device and electronic control system Download PDF

Info

Publication number
JP2014236248A
JP2014236248A JP2013114617A JP2013114617A JP2014236248A JP 2014236248 A JP2014236248 A JP 2014236248A JP 2013114617 A JP2013114617 A JP 2013114617A JP 2013114617 A JP2013114617 A JP 2013114617A JP 2014236248 A JP2014236248 A JP 2014236248A
Authority
JP
Japan
Prior art keywords
data
control unit
fraud determination
electronic control
signal
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
JP2013114617A
Other languages
Japanese (ja)
Inventor
行彦 大石
Yukihiko Oishi
行彦 大石
憲佳 笹澤
Noriyoshi Sasazawa
憲佳 笹澤
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.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
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 Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2013114617A priority Critical patent/JP2014236248A/en
Publication of JP2014236248A publication Critical patent/JP2014236248A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent an electronic control device connected with a network from operating erroneously due to unauthorized data at relatively low cost.SOLUTION: An electronic control device according to the invention comprises an I/O control unit connected with a communication bus in parallel with a communication control unit, and the I/O control unit outputs a signal invalidating unauthorized data to the communication bus before an ACK field of the unauthorized data is received.

Description

本発明は、電子制御装置に関するものである。   The present invention relates to an electronic control device.

従来、本技術分野に関連する技術として、「不必要なデータの転送をなくすことができる車載ゲートウェイを提供する。」ことを課題とし、「ゲートウェイ100bはユーザに対してクローズなバス103とユーザに対してオープンなバス105との間に接続され、プロトコルを変換する機能などを有する。必要なデータや正規のデータがゲートウェイ100bに送られたときには、それらのデータを他のバスに転送する。一方、不完全なデータや不正なデータがゲートウェイ100bに送られてきたときには、それらのデータはゲートウェイ100bにおいて転送しない。」ことを解決手段とする技術が提案されている(特許文献1:要約)。   Conventionally, as a technology related to this technical field, the problem is “provide an in-vehicle gateway that can eliminate unnecessary data transfer.” On the other hand, it is connected to the open bus 105 and has a function of converting a protocol, etc. When necessary data or regular data is sent to the gateway 100b, the data is transferred to another bus. In this case, a technique is proposed in which “when incomplete data or illegal data is sent to the gateway 100b, the data is not transferred in the gateway 100b” (Patent Document 1: Abstract).

また、「ローカルエリアネットワークを介して共通の暗号鍵を用いた暗号通信を行う通信システムにおいて、鍵交換に要する時間の短縮を図ることを目的とする。」ことを課題とし、解決手段として、「システムが起動すると、ゲートウェイECU(GW)が暗号鍵を生成し、これを種鍵を用いて暗号化した暗号化データを、放送形式で全ECU(ECU1 〜ECUN )に一括配信する。各ECUは、受信した暗号化データを種鍵を用いて復号し、復号結果を暗号鍵として以後の通信データの暗号化、復号に用いる。また暗号鍵を設定したECUは、その旨を表す応答(鍵確認)を生成し、これを暗号鍵を用いて暗号化した暗号化データをゲートウェイECUに返送する。ゲートウェイECUは、その応答に基づいて各ECUの正当性を判定する。」ことを解決手段とする技術が提案されている(特許文献2:要約)。   Another object of the present invention is to reduce the time required for key exchange in a communication system that performs cryptographic communication using a common cryptographic key via a local area network. When the system is activated, the gateway ECU (GW) generates an encryption key, and the encrypted data obtained by encrypting the encryption key using the seed key is distributed to all the ECUs (ECU1 to ECUN) in a broadcast format. The received encrypted data is decrypted using a seed key, and the decryption result is used as an encryption key for subsequent communication data encryption and decryption, and the ECU that has set the encryption key sends a response (key confirmation) ) And the encrypted data encrypted using the encryption key is returned to the gateway ECU, which determines the legitimacy of each ECU based on the response. . To "have been proposed technology and solutions that (Patent Document 2: Summary).

特開2002−016614号公報JP 2002-016614 A 特開2005−341528号公報JP 2005-341528 A

上記特許文献1においては、不正データの侵入を防御する技術として、車載ネットワークの入口にファイヤーウォール機能を実装したGWを実装することが記載されている。しかし例えば、GWの内側に不正データを送信する機器を取り付けるなど、GWを介さず不正データを車載ネットワークに侵入させる攻撃は防御することができず、防御できる範囲が限定的となるため、信頼性に課題が残る。   In the above-mentioned patent document 1, it is described that a GW having a firewall function is installed at the entrance of an in-vehicle network as a technique for preventing intrusion of illegal data. However, for example, an attack that causes unauthorized data to enter the in-vehicle network without going through the GW, such as mounting a device that transmits unauthorized data inside the GW, cannot be prevented, and the range that can be protected is limited. The problem remains.

上記特許文献2においては、ネットワーク全体を暗号化して、車載電子制御装置に不正データを認識させないことにより、不正データによる車載電子制御装置の誤作動を防御することが記載されている。しかしこれを実現するためには、ネットワークに接続された車載電子制御装置のすべてを暗号化に対応させる必要があり、品質確保のための工数が大きい。また品質確保のための作業工程において不具合が入り込む可能性がある。   Patent Document 2 describes that the entire network is encrypted so that the in-vehicle electronic control device does not recognize unauthorized data, thereby preventing malfunction of the in-vehicle electronic control device due to unauthorized data. However, in order to realize this, it is necessary to make all of the vehicle-mounted electronic control devices connected to the network compatible with encryption, and the man-hours for ensuring quality are large. In addition, there is a possibility that defects may occur in the work process for ensuring quality.

本発明は上記課題に鑑みてなされたものであり、比較的小さいコストで、ネットワークに接続された電子制御装置が不正データにより誤作動することを防ぐことを目的とするものである。   The present invention has been made in view of the above problems, and an object thereof is to prevent an electronic control device connected to a network from malfunctioning due to unauthorized data at a relatively low cost.

本発明に係る電子制御装置は、通信バスに対して通信制御部と並列に接続されたI/O制御部を備え、I/O制御部は不正データのACKフィールドを受信する前に当該不正データを無効化する信号を通信バスに対して出力する。   The electronic control device according to the present invention includes an I / O control unit connected in parallel to the communication control unit with respect to the communication bus, and the I / O control unit receives the illegal data before receiving the ACK field of the illegal data. A signal for invalidating is output to the communication bus.

本発明に係る電子制御装置によれば、簡易な構成により、不正データによる誤作動を防ぐことができる。また、不正データを無効化することにより、不正機器がネットワーク内に侵入しても、その攻撃から電子制御装置を防御することができる。   According to the electronic control device of the present invention, malfunction due to unauthorized data can be prevented with a simple configuration. Further, by invalidating illegal data, even if an illegal device enters the network, the electronic control device can be protected from the attack.

実施形態1に係る電子制御システム2を搭載した車両1の構成図である。1 is a configuration diagram of a vehicle 1 equipped with an electronic control system 2 according to Embodiment 1. FIG. 電子制御システム2と電子制御システム4の接続例を示す図である。It is a figure which shows the example of a connection of the electronic control system 2 and the electronic control system 4. FIG. 電子制御システム2の内部構成例を示す図である。2 is a diagram illustrating an internal configuration example of an electronic control system 2. FIG. ECU302の内部構成図である。2 is an internal configuration diagram of an ECU 302. FIG. ネットワークバス301上を流れるデータのフレーム構造例を示す図である。3 is a diagram illustrating an example of a frame structure of data flowing on a network bus 301. FIG. 不正データを受信したときにおけるECU302の動作タイミングとネットワークバス301の状態を示すタイムチャートである。6 is a time chart showing the operation timing of the ECU 302 and the state of the network bus 301 when unauthorized data is received. ECU302が不正データを検出して無効化する処理を説明するフローチャートである。It is a flowchart explaining the process which ECU302 detects and invalidates illegal data. ステップS701の詳細を示すフローチャートである。It is a flowchart which shows the detail of step S701. ステップS703の詳細を示すフローチャートである。It is a flowchart which shows the detail of step S703. ステップS704の詳細を示すフローチャートである。It is a flowchart which shows the detail of step S704. 実施形態3におけるECU302の内部構成を示す。The internal structure of ECU302 in Embodiment 3 is shown. CPU制御部405が不正防止プログラム4071〜4074を実行する手順を説明するフローチャートである。It is a flowchart explaining the procedure in which CPU control part 405 performs the fraud prevention program 4071-4074. 実施形態4におけるECU302と監視ECU131の内部構成を示す図である。It is a figure which shows the internal structure of ECU302 and monitoring ECU131 in Embodiment 4. FIG.

<実施の形態1:電子制御システムの構成>
図1は、本発明の実施形態1に係る電子制御システム2を搭載した車両1の構成図である。車両1は、電子制御システム2を有する。電子制御システム2は、例えばCAN、FlexRay(登録商標)、Ethernet、などのプロトコルを用いて電子制御装置同士が接続された車載ネットワークシステムである。無線通信部3は、電子制御システム2の外部と無線通信(例えば携帯電話、無線LAN、WAN、等を使用した通信)する。電子制御システム4は、電子制御システム2とは別の車載ネットワークシステムである。有線通信部5は、例えば診断端子(OBD)、Ethernet端子、外部記録媒体(例えばUSBメモリ、SDカード、等)端子など、有線接続により電子制御システム2にアクセスする。表示装置6は、例えば電子制御システム2からのデータを受信し、メッセージなど必要な情報を表示する、液晶ディスプレイなどのデバイスである。
<Embodiment 1: Configuration of electronic control system>
FIG. 1 is a configuration diagram of a vehicle 1 equipped with an electronic control system 2 according to Embodiment 1 of the present invention. The vehicle 1 has an electronic control system 2. The electronic control system 2 is an in-vehicle network system in which electronic control devices are connected using a protocol such as CAN, FlexRay (registered trademark), Ethernet, or the like. The wireless communication unit 3 performs wireless communication with the outside of the electronic control system 2 (for example, communication using a mobile phone, a wireless LAN, a WAN, or the like). The electronic control system 4 is an in-vehicle network system different from the electronic control system 2. The wired communication unit 5 accesses the electronic control system 2 through a wired connection such as a diagnostic terminal (OBD), an Ethernet terminal, or an external recording medium (for example, USB memory, SD card, etc.) terminal. The display device 6 is a device such as a liquid crystal display that receives data from the electronic control system 2 and displays necessary information such as a message.

図2は、電子制御システム2と電子制御システム4の接続例を示す図である。ゲートウェイ(GW)7は、各電子制御システムのネットワークバス間でデータを中継する。また必要に応じて通信プロトコルを変換する。   FIG. 2 is a diagram illustrating an example of connection between the electronic control system 2 and the electronic control system 4. The gateway (GW) 7 relays data between the network buses of each electronic control system. Also, the communication protocol is converted as necessary.

図3は、電子制御システム2の内部構成例を示す図である。ネットワークバス301はネットワーク上の電子制御装置302を接続する、例えばCANバスなどの通信バスである。ECU(Electronic Control Unit:電子制御装置)302は、ネットワークバス301に接続され、ネットワークバス301を介して他のECU302との間でデータを送受信する。ECU302は、ネットワークバス301を介して図示しないH/Wに接続され、そのH/Wを制御する。例えば、表示装置6をECU302が制御するように構成することができる。   FIG. 3 is a diagram illustrating an internal configuration example of the electronic control system 2. A network bus 301 is a communication bus such as a CAN bus for connecting the electronic control device 302 on the network. An ECU (Electronic Control Unit) 302 is connected to the network bus 301 and transmits / receives data to / from another ECU 302 via the network bus 301. The ECU 302 is connected to an H / W (not shown) via the network bus 301 and controls the H / W. For example, the display device 6 can be configured to be controlled by the ECU 302.

GW7とECU302は、双方の機能を備える場合もあるし、いずれか一方の機能のみを備える場合もある。本発明に係る電子制御装置は、ECU302を想定しているが、GW7を同様に構成することもできる。   The GW 7 and the ECU 302 may have both functions or only one of the functions. The electronic control device according to the present invention assumes the ECU 302, but the GW 7 can be similarly configured.

図4は、ECU302の内部構成図である。MainCPU401は、例えばエンジン、トランスミッション等の車両1が備えるH/Wを制御するプロセッサである。SubCPU402は、例えばMainCPUの暴走監視等の制御を実行するプロセッサである。通信I/F403は、ネットワークバス301との間でデータを送受信する。内部バス404は、ECU302内部における通信のための通信バスである。   FIG. 4 is an internal configuration diagram of the ECU 302. Main CPU401 is a processor which controls H / W with which vehicles 1, such as an engine and a transmission, are provided, for example. The SubCPU 402 is a processor that executes control such as runaway monitoring of the Main CPU. The communication I / F 403 transmits / receives data to / from the network bus 301. The internal bus 404 is a communication bus for communication within the ECU 302.

MainCPU401は、CPU制御部405、I/O制御部406、記憶素子407、通信制御部408を備える。   The Main CPU 401 includes a CPU control unit 405, an I / O control unit 406, a storage element 407, and a communication control unit 408.

CPU制御部405は、記憶素子407が記憶している情報を読み出して演算を実施する機能、記憶素子407に演算結果を格納する機能、I/O制御部406と通信制御部408に対する命令を生成する機能を有する。I/O制御部406は、ネットワークバス301に対して通信制御部408および通信I/F403と並列に接続されており、ネットワークバス301から受信したデータを記憶素子407に格納する機能、CPU制御部405からの命令にしたがってネットワークバス301に対して電気信号を出力する機能を有する。記憶素子407は、ROM、RAM、レジスタ等の記憶素子である。通信制御部408は、CPU制御部405からの命令にしたがって通信I/F403に通信データを送受信するよう指示する機能、受信した値を記憶素子407に格納する機能を有する。   The CPU control unit 405 generates a function for reading the information stored in the storage element 407 and performing an operation, a function for storing the operation result in the storage element 407, and an instruction for the I / O control unit 406 and the communication control unit 408. It has the function to do. The I / O control unit 406 is connected to the network bus 301 in parallel with the communication control unit 408 and the communication I / F 403, and has a function of storing data received from the network bus 301 in the storage element 407, a CPU control unit A function of outputting an electrical signal to the network bus 301 in accordance with a command from 405 is provided. The storage element 407 is a storage element such as a ROM, a RAM, or a register. The communication control unit 408 has a function of instructing the communication I / F 403 to transmit / receive communication data in accordance with a command from the CPU control unit 405 and a function of storing the received value in the storage element 407.

SubCPU402は、CPU制御部409、I/O制御部410、記憶素子411を備える。これらの機能は、CPU制御部405、I/O制御部406、記憶素子407と同様である。   The SubCPU 402 includes a CPU control unit 409, an I / O control unit 410, and a storage element 411. These functions are the same as those of the CPU control unit 405, the I / O control unit 406, and the storage element 407.

通信I/F403はネットワークバス301上を流れる電気信号を監視し、ネットワークバス301に対して他の電子機器から送信されたデータを受信完了したタイミングで、電気信号をデータに変換して通信制御部408に出力する。通信制御部408は、受け取ったデータからECU302が受信すべきデータをフィルタリングして記憶素子407に格納する。ECU302が受信すべきデータは、CPU制御部405がそのデータのIDを通信制御部408に対して指定することによりフィルタリングすることができる。   The communication I / F 403 monitors an electrical signal flowing on the network bus 301, converts the electrical signal into data at a timing when reception of data transmitted from another electronic device to the network bus 301 is completed, and a communication control unit Output to 408. The communication control unit 408 filters data to be received by the ECU 302 from the received data and stores the data in the storage element 407. Data to be received by the ECU 302 can be filtered by the CPU control unit 405 specifying the ID of the data to the communication control unit 408.

CPU制御部405は、送信するデータを記憶素子407に記憶し、通信制御部408に対して送信指示を出力する。通信制御部408は、CPU制御部405から送信指示を受け取ると、記憶素子407から送信すべきデータを読み出し、準拠すべき通信プロトコルに合わせたデータ形式に変換し、送信指示と併せて通信I/F403に出力する。通信I/F403は、通信制御部408から送信データと送信指示を受け取ると、送信データを電気信号に変換してネットワークバス301に出力する。   The CPU control unit 405 stores the data to be transmitted in the storage element 407 and outputs a transmission instruction to the communication control unit 408. When the communication control unit 408 receives a transmission instruction from the CPU control unit 405, the communication control unit 408 reads data to be transmitted from the storage element 407, converts the data to a data format conforming to a communication protocol to be compliant, and combines the communication I / O with the transmission instruction. Output to F403. When receiving the transmission data and the transmission instruction from the communication control unit 408, the communication I / F 403 converts the transmission data into an electric signal and outputs it to the network bus 301.

I/O制御部406は、ネットワークバス301と直接結線されており、CPU制御部405はI/O制御部406を介してネットワークバス301上を流れる電気信号レベルをリアルタイムにモニタする。これにより、通信I/F403がネットワークバス301上を流れるデータを受信完了するまで待つことなく、リアルタイムでネットワークバス301上を流れるデータを監視することができる。I/O制御部406はネットワークバス301上を流れる電気信号レベルを取り込み、記憶素子407に格納する。CPU制御部405は、記憶素子407が記憶しているネットワークバス301の現在の電気信号レベルを読み取ることにより、ネットワークバス301の電気信号レベルをリアルタイムで監視する。   The I / O control unit 406 is directly connected to the network bus 301, and the CPU control unit 405 monitors the electric signal level flowing on the network bus 301 via the I / O control unit 406 in real time. Thereby, the data flowing on the network bus 301 can be monitored in real time without waiting until the communication I / F 403 completes reception of the data flowing on the network bus 301. The I / O control unit 406 takes in the electric signal level flowing on the network bus 301 and stores it in the storage element 407. The CPU control unit 405 monitors the electrical signal level of the network bus 301 in real time by reading the current electrical signal level of the network bus 301 stored in the storage element 407.

I/O制御部406は、通信制御部408と通信I/F403を介することなく、ネットワークバス301に対して直接電気信号を出力することができる。I/O制御部406は、ネットワークバス301に対して電気信号を出力するようにCPU制御部405から命令を受けると、その命令にしたがって通信制御部408と通信I/F403を介さずにネットワークバス301に対して電気信号を出力する。   The I / O control unit 406 can directly output an electrical signal to the network bus 301 without passing through the communication control unit 408 and the communication I / F 403. When the I / O control unit 406 receives a command from the CPU control unit 405 so as to output an electrical signal to the network bus 301, the network bus does not pass through the communication control unit 408 and the communication I / F 403 according to the command. An electrical signal is output to 301.

<実施の形態1:ネットワークプロトコルの例>
図5は、ネットワークバス301上を流れるデータのフレーム構造例を示す図である。ここでは通信プロトコルとしてCANを使用した場合におけるデータフレームのデータ構造を示している。各フィールドの数値はビット数を表している。
<Embodiment 1: Example of network protocol>
FIG. 5 is a diagram illustrating a frame structure example of data flowing on the network bus 301. Here, the data structure of a data frame when CAN is used as a communication protocol is shown. The numerical value of each field represents the number of bits.

CANにおいては、ネットワーク装置がデータを送信するときバス信号をドミナントレベル(0)に設定し、同一バス上に接続されたネットワーク装置がデータを送信または受信するときにバス信号がドミナントレベル(0)またはリセッシブレベル(1)のいずれであるかを検知することにより、データ通信を調停する。ドミナントレベルはリセッシブレベルより優先度が高いため、いずれかのネットワーク装置がドミナントレベルを送信しているとき、他のネットワーク装置がリセッシブレベルを送信しても、ネットワークバス301はドミナントレベルに設定される。   In CAN, when a network device transmits data, the bus signal is set to a dominant level (0), and when a network device connected on the same bus transmits or receives data, the bus signal is set to a dominant level (0). Alternatively, data communication is arbitrated by detecting which of the recessive level (1). Since the dominant level has a higher priority than the recessive level, when any network device is transmitting the dominant level, the network bus 301 is set to the dominant level even if another network device transmits the recessive level. Is done.

SOF(Start Of Frame)はデータフレームの開始位置を示しており、データフレームの同期を取るために用いられ。SOFは常にドミナントが送信される。   SOF (Start Of Frame) indicates the start position of the data frame, and is used to synchronize the data frame. SOF is always transmitted as a dominant.

識別子(ID)は、データのID(以下データID)を示しており、このデータIDにより各ネットワーク装置は当該データの種類を識別することができる。   The identifier (ID) indicates an ID of data (hereinafter referred to as a data ID), and each network device can identify the type of the data by this data ID.

IDおよびRTR(Remote Transmission Request)ビットをアービトレーション・フィールドと呼び、このフィールドによりネットワークバス301のアービトレーション(調停)を実施する。RTRは図5(a)に示す例においては常にドミナントレベルが設定される。RTRの値がリセッシブレベルである場合は、図5(b)のような拡張フォーマットを用いることを示す。この場合はIDを29ビットで表現することができる。拡張フォーマットのデータ・フィールド以降の構成は図5(a)と同様である。   An ID and an RTR (Remote Transmission Request) bit are called an arbitration field, and arbitration of the network bus 301 is performed by this field. The RTR is always set to a dominant level in the example shown in FIG. When the value of RTR is a recessive level, it indicates that an extended format as shown in FIG. 5B is used. In this case, the ID can be expressed by 29 bits. The structure after the data field of the extended format is the same as that shown in FIG.

RB1とRB0は予約ビットであり、常にドミナントレベルが設定される。
DLCは、データ・フィールドのデータ長(バイト数)を表している。
RB1 and RB0 are reserved bits, and a dominant level is always set.
DLC represents the data length (number of bytes) of the data field.

データ・フィールドは、送信するデータの内容を示しており、Nバイト分のデータが可変長で送信される。   The data field indicates the content of data to be transmitted, and N bytes of data are transmitted with a variable length.

CRC・フィールドはデータフレームのCRCが入力される。CRC境界はアクノリッジとCRC・フィールドとの間の境界を表し、常にリセッシブレベルで送信される。CRC境界がドミナントレベルにセットされている場合、当該データフレームは無効なものとみなされる。   In the CRC field, the CRC of the data frame is input. The CRC boundary represents the boundary between the acknowledge and the CRC field and is always transmitted at a recessive level. If the CRC boundary is set to the dominant level, the data frame is considered invalid.

アクノリッジは、受信ノード(ECU302やGW7)が正しくデータを受信した場合に、確認応答としてドミナントレベルに設定して送信するためのフィールドである。アクノリッジ境界は、アクノリッジとEOFとの間の境界を表し、常にリセッシブレベルで送信される。   The acknowledge is a field for setting and transmitting the dominant level as a confirmation response when the receiving node (ECU 302 or GW 7) correctly receives data. The acknowledge boundary represents the boundary between the acknowledge and the EOF, and is always transmitted at a recessive level.

EOF(End Of Frame)はデータフレームの終端を示し、7ビットのリセッシブレベルが送信される。   EOF (End Of Frame) indicates the end of the data frame, and a 7-bit recessive level is transmitted.

車載ネットワークにおいては、特定のネットワーク装置が定期的にネットワークに対して自ネットワーク装置が観測した値(例えばセンサの値)を送信し、別のネットワーク装置に対してその状態を通知する。CANにおいては、図5で説明したフォーマットのデータを送受信する。データを受信するネットワーク装置は、送信されたデータが所定のフォーマットとは異なるフォーマットで送信されたことを検出すると、それをフォーム・エラーとして検出する。フォーム・エラーを検出したネットワーク装置は、即時にエラーフレームを出力し、以後のバス上におけるデータ送信を無効化する。   In an in-vehicle network, a specific network device periodically transmits a value (for example, a sensor value) observed by the own network device to the network, and notifies the status to another network device. In the CAN, data in the format described with reference to FIG. 5 is transmitted / received. When the network device receiving the data detects that the transmitted data is transmitted in a format different from the predetermined format, it detects it as a form error. The network device that has detected the form error immediately outputs an error frame and invalidates subsequent data transmission on the bus.

<実施の形態1:なりすまし攻撃の例>
本発明において主に防御対象とする、不正データを侵入させてネットワーク装置を誤動作させる攻撃を、なりすまし攻撃と呼ぶ。CANにおけるなりすまし攻撃は、データIDを既存のデータIDになりすます。さらに、なりすます対象のデータに、チェックサムなどのチェック符号が付与されている場合は、その符号もなりすます。これにより、不正データを受信したネットワーク装置がそのデータを不正データであるか否か判断できないようにする。
<Embodiment 1: Example of impersonation attack>
In the present invention, an attack that is mainly targeted for defense and causes malfunction of a network device by intruding illegal data is called a spoofing attack. A spoofing attack in CAN impersonates a data ID with an existing data ID. In addition, if the data to be spoofed has a check code such as a checksum, that code is also impersonated. This prevents the network device that has received the illegal data from determining whether the data is illegal data.

<実施の形態1:不正データを検出する方法の例>
本実施形態1において採用する、不正データを検出する方法について説明する。検出対象とするのは、所定周期で送信されるデータである。記憶素子407は、不正データ判定用データベース(DB)と呼ばれる、不正データを判定するためのデータベースを格納している。不正データ判定用DBは、所定周期で送信されるデータそれぞれについて、データIDと送信周期を格納する。
<Embodiment 1: Example of method for detecting illegal data>
A method for detecting illegal data employed in the first embodiment will be described. Data to be detected is data transmitted at a predetermined cycle. The storage element 407 stores a database called illegal data determination database (DB) for determining illegal data. The illegal data determination DB stores a data ID and a transmission cycle for each data transmitted at a predetermined cycle.

CPU制御部405は、ネットワークバス301に対して送信されたデータについて、前回の送信タイミングと今回の送信タイミングとの間の差分から算出した送信周期と、不正データ判定用DBに登録されている送信周期を比較する。比較の結果、算出した送信周期が、不正データ判定用DBに登録されている送信周期よりも短い場合、CPU制御部405は当該データが所定周期の送信タイミングに侵入した不正データであると判定する。不正データ判定用DBは、ネットワークバス301を流れるデータのID毎に送信周期を格納する。   For the data transmitted to the network bus 301, the CPU control unit 405 transmits the transmission cycle calculated from the difference between the previous transmission timing and the current transmission timing, and the transmission registered in the unauthorized data determination DB. Compare periods. As a result of the comparison, when the calculated transmission cycle is shorter than the transmission cycle registered in the unauthorized data determination DB, the CPU control unit 405 determines that the data is unauthorized data that has entered the transmission timing of the predetermined cycle. . The unauthorized data determination DB stores a transmission cycle for each ID of data flowing through the network bus 301.

以下の説明においては、送信周期に基づき不正データを検出する方法を用いることを前提として説明する。しかし以下に説明するように、受信したデータが不正データであるか否かをCRC境界までに判定して無効化することができる限り、その他の手法を用いて不正データを検出してもよい。   In the following description, description will be made on the assumption that a method of detecting illegal data based on a transmission cycle is used. However, as will be described below, other methods may be used to detect illegal data as long as it is possible to determine whether the received data is illegal data by the CRC boundary and invalidate it.

<実施の形態1:なりすまし攻撃を防御する方法の例>
図6は、不正データを受信したときにおけるECU302(I/O制御部406およびCPU制御部405)の動作タイミングとネットワークバス301の状態を示すタイムチャートである。以下図6にしたがって、ECU302が不正データを無効化する手順を説明する。
<Embodiment 1: Example of a method for defending against an impersonation attack>
FIG. 6 is a time chart showing the operation timing of the ECU 302 (I / O control unit 406 and CPU control unit 405) and the state of the network bus 301 when illegal data is received. The procedure for invalidating illegal data by the ECU 302 will be described below with reference to FIG.

I/O制御部406は、不正データを無効化するとき以外は、ネットワークバス301に干渉しないように、リセッシブレベルを出力する。不正データを無効化するときの動作については以下に述べる。   The I / O control unit 406 outputs a recessive level so as not to interfere with the network bus 301 except when invalid data is invalidated. The operation when invalid data is invalidated is described below.

I/O制御部406は、ネットワークバス301を流れる電気信号レベルをリアルタイムで監視する。CPU制御部405は、バスフリーの状態から信号レベルが変化することを検出することにより、ネットワークバス301に対してデータ送信が開始された(SOF)ことを検出する。   The I / O control unit 406 monitors the electric signal level flowing through the network bus 301 in real time. The CPU control unit 405 detects that data transmission to the network bus 301 is started (SOF) by detecting that the signal level changes from the bus free state.

CPU制御部405は、I/O制御部406がIDフィールドを受信完了した時刻601において、受信したIDに対応する送信周期を不正データ検出用DBから読み出し、所定周期で送信されたデータであるか否かを判定する。受信したデータが不正データではないと判定した場合は、I/O制御部406はネットワークバス301上を流れるデータに干渉しないようにリセッシブレベルを出力し続ける。受信したデータが不正データであると判定した場合は、I/O制御部406は以下に説明する不正データを無効化する処理を実施する。   The CPU control unit 405 reads out the transmission cycle corresponding to the received ID from the illegal data detection DB at the time 601 when the I / O control unit 406 has completed receiving the ID field, and is the data transmitted at a predetermined cycle? Determine whether or not. If it is determined that the received data is not illegal data, the I / O control unit 406 continues to output a recessive level so as not to interfere with data flowing on the network bus 301. When it is determined that the received data is illegal data, the I / O control unit 406 performs processing for invalidating illegal data described below.

I/O制御部406は、不正データのCRC境界がネットワークバス301上に送信されるタイミング(時刻602)において、不正データを無効化するため、ドミナントレベルを出力する。これにより、ネットワークバス301上には、不正データのCRC境界であるリセッシブレベル信号と、I/O制御部406が出力するドミナントレベル信号とが併存することになるが、ドミナントレベルとリセッシブレベルの優先順位にしたがって、ネットワークバス301の電気信号レベルはドミナントとなる。CRC境界の電気信号レベルがドミナントである場合、不正データを受信したネットワーク装置はフォーム・エラーを検出してエラーフレームを送信する。これにより不正データは無効化される。   The I / O control unit 406 outputs a dominant level in order to invalidate illegal data at the timing (time 602) when the CRC boundary of illegal data is transmitted on the network bus 301. As a result, the recessive level signal that is the CRC boundary of illegal data and the dominant level signal output from the I / O control unit 406 coexist on the network bus 301. However, the dominant level and the recessive level are present. The electrical signal level of the network bus 301 becomes dominant according to the priority order. When the electrical signal level at the CRC boundary is dominant, the network device that has received the illegal data detects a form error and transmits an error frame. This invalidates invalid data.

不正データを無効化するための信号は、他のネットワーク装置が不正データを受信確認する前までに送信する必要がある。すなわち、I/O制御部406が不正データのアクノリッジを受信する前まで(例えば上述のようにCRC境界)に、不正データを無効化する信号を送信する必要がある。そこでCPU制御部405は、CPU制御部405とI/O制御部406の処理時間を考慮して、CRC境界より前の時刻(例えば時刻603)において、I/O制御部406に対してCRC境界をドミナントレベルにセットするよう指示する。   The signal for invalidating the illegal data needs to be transmitted before other network devices confirm the reception of the illegal data. That is, it is necessary to transmit a signal for invalidating invalid data before the I / O control unit 406 receives an acknowledge of illegal data (for example, as described above, at a CRC boundary). Therefore, the CPU control unit 405 considers the processing time of the CPU control unit 405 and the I / O control unit 406, and the CRC boundary with respect to the I / O control unit 406 at a time before the CRC boundary (for example, time 603). To set to the dominant level.

図7は、ECU302が不正データを検出して無効化する処理を説明するフローチャートである。以下、図7の各ステップについて説明する。   FIG. 7 is a flowchart illustrating a process in which the ECU 302 detects invalid data and invalidates it. Hereinafter, each step of FIG. 7 will be described.

(図7:ステップS701)
I/O制御部406は、ネットワークバス301からデータを受信する。本ステップの詳細は後述の図8で説明する。
(FIG. 7: Step S701)
The I / O control unit 406 receives data from the network bus 301. Details of this step will be described later with reference to FIG.

(図7:ステップS702〜S704)
CPU制御部405は、ステップS701において受信したデータのIDフィールドを受信完了した時点(図6の時刻601)でステップS704を実施し、CRC境界を受信するよりも前の時点(図6の時刻603)でステップS703を実施する。ステップS703とS704の詳細は後述の図9〜図10で説明する。ステップS703の後は本フローチャートを終了し、ステップS704の後はステップS705に進む。
(FIG. 7: Steps S702 to S704)
The CPU control unit 405 performs step S704 when the reception of the ID field of the data received in step S701 is completed (time 601 in FIG. 6), and before the reception of the CRC boundary (time 603 in FIG. 6). ), Step S703 is performed. Details of steps S703 and S704 will be described later with reference to FIGS. After step S703, this flowchart is ended, and after step S704, the process proceeds to step S705.

(図7:ステップS705)
I/O制御部406は、不正データのみを無効化してその他のデータに干渉しないようにするため、出力をリセッシブレベルに戻す。
(FIG. 7: Step S705)
The I / O control unit 406 returns the output to the recessive level in order to invalidate only illegal data and prevent interference with other data.

図8は、ステップS701の詳細を示すフローチャートである。S801においてI/O制御部406は、受信したデータの各フィールドを特定する。S802においてI/O制御部406は、受信したデータの各フィールド値(ドミナント/リセッシブ)を読み取り、送信開始(SOF)から現在までのデータ内容を記憶素子407に格納する。   FIG. 8 is a flowchart showing details of step S701. In S801, the I / O control unit 406 specifies each field of the received data. In S <b> 802, the I / O control unit 406 reads each field value (dominant / recessive) of the received data, and stores the data content from the start of transmission (SOF) to the present in the storage element 407.

図9は、ステップS703の詳細を示すフローチャートである。ステップS703は、不正データを無効化する信号を出力する処理である。以下、図9の各ステップについて説明する。   FIG. 9 is a flowchart showing details of step S703. Step S703 is processing to output a signal for invalidating illegal data. Hereinafter, each step of FIG. 9 will be described.

(図9:ステップS901)
CPU制御部405は、ドミナントレベルを出力すべき旨の要求が存在しているか否かを判定する。同要求の有無は、例えば図10で説明するドミナント出力要求フラグの値に基づき判定する。同フラグがセットされていればステップS902とS903に進み、それ以外であれば本フローチャートを終了する。
(FIG. 9: Step S901)
The CPU control unit 405 determines whether there is a request to output the dominant level. The presence / absence of the request is determined based on, for example, the value of the dominant output request flag described in FIG. If the flag is set, the process proceeds to steps S902 and S903, and if not, this flowchart ends.

(図9:ステップS902)
CPU制御部405は、ネットワークバス301に対してドミナントレベル信号を出力すべき旨の命令を、I/O制御部406に対して送信する。I/O制御部406は、同命令を受け取ると、ネットワークバス301に対して、不正データを無効化するためのドミナントレベル信号を出力する。
(FIG. 9: Step S902)
The CPU control unit 405 transmits an instruction to output a dominant level signal to the network bus 301 to the I / O control unit 406. Upon receiving the instruction, the I / O control unit 406 outputs a dominant level signal for invalidating invalid data to the network bus 301.

(図9:ステップS903)
CPU制御部405は、不正データのみを無効化してその他のデータに干渉しないようにするため、セットされているドミナント出力要求フラグをクリアする。
(FIG. 9: Step S903)
The CPU control unit 405 clears the set dominant output request flag in order to invalidate only illegal data and prevent interference with other data.

図10は、ステップS704の詳細を示すフローチャートである。ステップS704は不正データを検出する処理である。以下、図10の各ステップについて説明する。   FIG. 10 is a flowchart showing details of step S704. Step S704 is processing for detecting illegal data. Hereinafter, each step of FIG. 10 will be described.

(図10:ステップS1001)
CPU制御部405は、図7のステップS701において取り込んだデータ内容に基づき、受信したデータのIDを特定する。
(FIG. 10: Step S1001)
The CPU control unit 405 identifies the ID of the received data based on the data content captured in step S701 in FIG.

(図10:ステップS1002)
CPU制御部405は、ステップS701において受信したデータの今回の受信時刻と前回の受信時刻との間の差分に基づき、当該データの送信周期を算出する。例えばMainCPU401が実装している内部タイマなどを用いて時刻の差分を計算することができる。
(FIG. 10: Step S1002)
The CPU control unit 405 calculates the transmission cycle of the data based on the difference between the current reception time and the previous reception time of the data received in step S701. For example, the time difference can be calculated using an internal timer mounted on the Main CPU 401.

(図10:ステップS1003)
CPU制御部405は、ステップS1002において算出した送信周期と、不正データ判定用DBに登録されている送信周期とを比較する。算出した送信周期が、不正データ判定用DBに登録されている送信周期よりも短い場合は、受信したデータが不正データであると判定する。不正データである場合はステップS1004へ進み、それ以外であればステップS1005へスキップする。本ステップにおけるCPU制御部405の動作は、「不正判定部」に相当する。
(FIG. 10: Step S1003)
The CPU control unit 405 compares the transmission cycle calculated in step S1002 with the transmission cycle registered in the unauthorized data determination DB. If the calculated transmission cycle is shorter than the transmission cycle registered in the unauthorized data determination DB, it is determined that the received data is unauthorized data. If it is illegal data, the process proceeds to step S1004; otherwise, the process skips to step S1005. The operation of the CPU control unit 405 in this step corresponds to a “fraud determination unit”.

(図10:ステップS1004〜S1005)
CPU制御部405は、ドミナント出力要求フラグをセットする(S1004)。CPU制御部405は、ネットワークバス301からデータを受信した時刻を記憶素子407に格納する。ステップS1002における前回の受信時刻は、本ステップにおいて記憶素子407に格納した時刻を用いる。
(FIG. 10: Steps S1004 to S1005)
The CPU control unit 405 sets a dominant output request flag (S1004). The CPU control unit 405 stores the time when data is received from the network bus 301 in the storage element 407. As the previous reception time in step S1002, the time stored in the storage element 407 in this step is used.

<実施の形態1:まとめ>
以上のように、本実施形態1に係るECU302によれば、I/O制御部406がネットワークバス301を監視し、他のECUが不正データを受信完了する(アクノリッジ)前にこれを検出して無効化することができる。これにより、車載ネットワークに接続している全ての電子制御装置を、なしすまし攻撃から防御することができる。また、車載ネットワーク内にECU302が1つでも接続されていれば、車載ネットワーク全範囲を防御することができるので、信頼性が確保された車載ネットワークを提供することができる。さらに、ECU302が不正データを無効化するので、全ての電子制御装置が同等の不正防止機能を備える必要はなく、比較的小さい品質確保の工数で上記機能を実現することができる。これにより、品質確保の作業工程で不具合が入り込む可能性が低くなるため、比較的小さいコストで車載ネットワークをなしすまし攻撃から防衛することができる。
<Embodiment 1: Summary>
As described above, according to the ECU 302 according to the first embodiment, the I / O control unit 406 monitors the network bus 301 and detects this before other ECUs complete receiving (acknowledgement) illegal data. Can be disabled. Thereby, all the electronic control apparatuses connected to the in-vehicle network can be protected from the spoofing attack. Further, if at least one ECU 302 is connected to the in-vehicle network, the entire range of the in-vehicle network can be protected, so that an in-vehicle network with ensured reliability can be provided. Further, since the ECU 302 invalidates the illegal data, it is not necessary for all the electronic control devices to have an equivalent anti-fraud function, and the above function can be realized with a relatively small man-hour for ensuring quality. As a result, since the possibility of defects entering the work process for ensuring quality is reduced, the in-vehicle network can be protected from a spoofing attack at a relatively low cost.

本実施形態1において、CANのCRC境界をドミナントレベルにセットすることにより不正データを無効化することを説明したが、不正データを無効化する手法はこれに限られるものではなく、通信プロトコルに応じてその他適当な手法を用いることができる。例えばCANにおいては、ドミナントレベルが所定個数連続すると当該データフレームは無効とみなされるので、不正データを検出した時点でI/O制御部406がその個数以上連続してドミナントレベル信号をネットワークバス301に出力し、これにより不正データを無効化することもできる。   In the first embodiment, the invalid data is invalidated by setting the CRC boundary of the CAN to the dominant level. However, the method for invalidating the invalid data is not limited to this, and depends on the communication protocol. Other suitable techniques can be used. For example, in CAN, if a predetermined number of dominant levels continue, the data frame is regarded as invalid. Therefore, when illegal data is detected, the I / O control unit 406 continuously transmits a dominant level signal to the network bus 301 over that number. It is possible to invalidate invalid data by outputting.

本実施形態1においては、他のECUがアクナリッジを出力する前までに不正データを無効化すればよいので、CRC境界をドミナントレベルにセットすることと同様の効果を発揮することができれば、その他のフィールドをドミナントレベルにセットすることにより不正データを無効化してもよい。ただし、リセッシブレベルとドミナントレベルの優先順位に鑑みて、ドミナントレベルを用いる必要がある。また、不正データを無効化する手法を複数併用してもよい。   In the first embodiment, it is sufficient that invalid data is invalidated before another ECU outputs an acknowledge. Therefore, if the same effect as that of setting the CRC boundary to the dominant level can be exhibited, Invalid data may be invalidated by setting the field to the dominant level. However, it is necessary to use the dominant level in view of the priority order of the recessive level and the dominant level. A plurality of methods for invalidating illegal data may be used in combination.

本実施形態1において、I/O制御部406がネットワークバス301上を流れるデータをリアルタイムで監視することを説明したが、同様の処理は、例えばSubCPU402のI/O制御部410、I/O制御部406と同様の機能を実装した専用IC、などを用いて実現することもできる。あるいは、通信I/F403が受信途中であるデータをCPU制御部405が参照できるようにすることによって同様の機能を実現することもできる。I/O制御部406がネットワークバス301に対して信号を出力する際も同様に、他の機能部が同様の機能を実現してもよい。I/O制御部406が取り込んだデータは、例えばSubCPU402の記憶素子411に格納してもよいし、別途追加した専用ICの記憶素子に格納してもよい。   In the first embodiment, it has been described that the I / O control unit 406 monitors data flowing on the network bus 301 in real time, but the same processing is performed by, for example, the I / O control unit 410 and the I / O control of the SubCPU 402. It can also be realized by using a dedicated IC in which the same function as that of the unit 406 is mounted. Alternatively, a similar function can be realized by allowing the CPU control unit 405 to refer to data being received by the communication I / F 403. Similarly, when the I / O control unit 406 outputs a signal to the network bus 301, other functional units may realize the same function. The data captured by the I / O control unit 406 may be stored in the storage element 411 of the SubCPU 402, for example, or may be stored in a storage element of a dedicated IC added separately.

<実施の形態2>
実施形態1において、不正データを無効化するECU302と同等の機能を別のECUにも実装し、不正防止機能を冗長系にすることができる。これにより、故障などの影響で実施形態1の不正防止機能をECU302が実施できなくなった場合でも、なりすまし攻撃に対する信頼性を維持することができる。
<Embodiment 2>
In the first embodiment, a function equivalent to that of the ECU 302 for invalidating illegal data can be implemented in another ECU, and the anti-fraud function can be made a redundant system. Thereby, even when the ECU 302 cannot perform the fraud prevention function of the first embodiment due to the influence of a failure or the like, the reliability against the spoofing attack can be maintained.

<実施の形態3>
実施形態1〜2において、不正データを無効化する機能がプログラムによって実装されている場合、同プログラムを格納した記憶素子407が改竄される攻撃を受けると、同機能が有効に動作しているか否か判別できなくなる。そこで本発明の実施形態3では、不正防止機能を実装したプログラムの改竄を検出する構成例を説明する。その他の構成は実施形態1〜2と同様である。なお記載の便宜上、一部の構成要素については省略した。
<Embodiment 3>
In the first and second embodiments, when a function for invalidating illegal data is implemented by a program, if the storage element 407 storing the program is subjected to an attack that is tampered with, the function is operating effectively. Cannot be determined. Therefore, in a third embodiment of the present invention, a configuration example for detecting falsification of a program in which a fraud prevention function is implemented will be described. Other configurations are the same as those in the first and second embodiments. For convenience of description, some components are omitted.

図11は、本実施形態3におけるECU302の内部構成を示す。本実施形態3において、記憶素子407は実施形態1で説明した不正防止機能を実装した不正防止プログラムを格納しており、同プログラムは複数(図11の例においては4つ)の記憶領域に分かれて格納されている。MainCPU401は、記憶素子407内の記憶領域をジャンプしながら、不正防止プログラムを実行する。不正防止プログラムは、単一のプログラムが複数の記憶領域に分かれて格納されているものとして構成することもできるし、複数のプログラムが次のプログラムを呼び出すものとして構成することもできる。以下では4つのプログラム4071〜4074がこの順序で次のプログラムを呼び出すように構成されているものと想定する。   FIG. 11 shows an internal configuration of the ECU 302 in the third embodiment. In the third embodiment, the storage element 407 stores a fraud prevention program that implements the fraud prevention function described in the first embodiment, and the program is divided into a plurality of (four in the example of FIG. 11) storage areas. Stored. The Main CPU 401 executes the fraud prevention program while jumping the storage area in the storage element 407. The fraud prevention program can be configured such that a single program is divided and stored in a plurality of storage areas, or can be configured such that a plurality of programs call the next program. In the following, it is assumed that the four programs 4071 to 4074 are configured to call the next program in this order.

MainCPU401のI/O制御部406とSubCPU402のI/O制御部410は内部バスを介して接続されている。CPU制御部405は、後述の図12で説明するフローチャートにしたがって、不正防止プログラムが改竄されているか否かを監視するための監視信号を、I/O制御部406に出力させる。I/O制御部406は、CPU制御部405からの命令にしたがって、I/O制御部410に対して監視信号を出力する。   The I / O control unit 406 of the Main CPU 401 and the I / O control unit 410 of the SubCPU 402 are connected via an internal bus. The CPU control unit 405 causes the I / O control unit 406 to output a monitoring signal for monitoring whether or not the fraud prevention program has been tampered with in accordance with a flowchart described later with reference to FIG. The I / O control unit 406 outputs a monitoring signal to the I / O control unit 410 in accordance with a command from the CPU control unit 405.

不正防止プログラムは、全ての記憶領域に格納された処理を完了すると、監視信号の信号レベル(Hi/Lo)を切り替えるように構成されている。処理が完了する前のいずれかの記憶領域が改竄された場合、記憶領域間のジャンプが正常に動作せず途中で中断し、不正防止プログラムは監視信号の信号レベルを切り替えないまま終了する。CPU制御409は、監視信号の信号レベル(Hi/Lo)が不正防止プログラムの実行周期毎に切り替わっているか否かを監視することにより、記憶素子407内の不正防止プログラムが改竄されたことを検出する。   The fraud prevention program is configured to switch the signal level (Hi / Lo) of the monitoring signal when the processing stored in all the storage areas is completed. If any storage area before the processing is completed is falsified, the jump between the storage areas does not operate normally and is interrupted in the middle, and the fraud prevention program ends without switching the signal level of the monitoring signal. The CPU control 409 detects that the fraud prevention program in the storage element 407 has been tampered with by monitoring whether the signal level (Hi / Lo) of the monitoring signal is switched at every execution period of the fraud prevention program. To do.

CPU制御部405は、所定周期でプログラム4071を起動する。プログラム4072〜プログラム4074は、この順序で次のプログラムを呼び出す。プログラム4074は、監視信号の信号レベルを反転させる命令を出力するように構成されている。CPU制御部405は、プログラム4074の記述にしたがって、監視信号の信号レベルを反転させる命令をI/O制御部406に対して出力する。   The CPU control unit 405 activates the program 4071 at a predetermined cycle. The programs 4072 to 4074 call the next program in this order. The program 4074 is configured to output a command for inverting the signal level of the monitoring signal. The CPU control unit 405 outputs a command for inverting the signal level of the monitoring signal to the I / O control unit 406 in accordance with the description of the program 4074.

CPU制御部409は、不正防止プログラム4071と同じ周期で、監視信号を監視するためのプログラムを起動する。監視信号の信号レベルが前回実行時から反転していない場合、記憶素子407の全部または一部が改竄される攻撃を受けたと判定し、その旨を示すエラー信号を出力する。   The CPU control unit 409 activates a program for monitoring the monitoring signal at the same cycle as the fraud prevention program 4071. If the signal level of the monitoring signal has not been reversed since the previous execution, it is determined that all or part of the storage element 407 has been tampered with, and an error signal indicating that fact is output.

図12は、CPU制御部405が不正防止プログラム4071〜4074を実行する手順を説明するフローチャートである。不正防止プログラム4071〜4074は、図12に示す順序で後続のプログラムを起動するように構成されている。不正防止プログラム4074は、監視信号を反転する。   FIG. 12 is a flowchart for explaining a procedure for the CPU control unit 405 to execute the fraud prevention programs 4071 to 4074. The fraud prevention programs 4071 to 4074 are configured to start subsequent programs in the order shown in FIG. The fraud prevention program 4074 inverts the monitoring signal.

以上の説明においては、SubCPU402がMainCPU401を監視することを説明したが、SubCPU402と同様の機能を、CPU制御部とI/O制御部を有する専用IC上に実装することもできる。   In the above description, it has been described that the Sub CPU 402 monitors the Main CPU 401. However, the same function as that of the Sub CPU 402 can be implemented on a dedicated IC having a CPU control unit and an I / O control unit.

<実施の形態4>
実施形態3においては、ECU302が搭載しているSubCPU402が記憶素子407内の不正防止プログラムの改竄を検出することを説明した。本発明の実施形態4では他のECUが不正防止プログラムの改竄を検出する構成例を説明する。その他の構成は実施形態3と同様である。
<Embodiment 4>
In the third embodiment, it has been described that the SubCPU 402 mounted on the ECU 302 detects falsification of the fraud prevention program in the storage element 407. In the fourth embodiment of the present invention, a configuration example in which another ECU detects falsification of the fraud prevention program will be described. Other configurations are the same as those of the third embodiment.

図13は、本実施形態4におけるECU302と監視ECU131の内部構成を示す図である。本実施形態4において、ECU302内のSubCPU402は、記憶素子407の改竄を監視する機能を備えていない。監視ECU131は、ネットワークバス301に接続されておらず、MainCPU132とSubCPU133を備える。   FIG. 13 is a diagram illustrating an internal configuration of the ECU 302 and the monitoring ECU 131 according to the fourth embodiment. In the fourth embodiment, the SubCPU 402 in the ECU 302 does not have a function of monitoring the alteration of the storage element 407. The monitoring ECU 131 is not connected to the network bus 301 and includes a Main CPU 132 and a Sub CPU 133.

MainCPU132は、CPU制御部134とI/O制御部135を備える。I/O制御部135は、I/O制御部406から監視信号を受け取る。CPU制御部134は、実施形態3におけるSubCPU402と同様の手法により、監視信号に基づき記憶素子407の全部または一部が改竄される攻撃を検出する。   The Main CPU 132 includes a CPU control unit 134 and an I / O control unit 135. The I / O control unit 135 receives a monitoring signal from the I / O control unit 406. The CPU control unit 134 detects an attack in which all or a part of the storage element 407 is falsified based on the monitoring signal by the same method as the SubCPU 402 in the third embodiment.

以上の説明においては、監視用ECU131のCPU制御部134とI/O制御部135が記憶素子407の改竄を監視することを説明したが、SubCPU133が同様の機能を備えることもできる。また、CPU制御部134およびI/O制御部135と同様の機能を有する専用ICを監視ECU131内に追加して、記憶素子407の改竄を監視することもできる。   In the above description, it has been described that the CPU control unit 134 and the I / O control unit 135 of the monitoring ECU 131 monitor the tampering of the storage element 407, but the SubCPU 133 can also have the same function. Further, a dedicated IC having the same functions as those of the CPU control unit 134 and the I / O control unit 135 can be added to the monitoring ECU 131 to monitor the alteration of the storage element 407.

図13において、監視ECU131はネットワークバス301に接続されていないことを説明したが、これは、監視用ECU131がネットワークバス301を介して攻撃されないようにするためのものである。したがって監視ECU131はネットワークバスに接続しないことが望ましいが、監視ECU131をネットワークバス301に接続した構成においても、記憶素子407を監視することはできる。   Although it has been described in FIG. 13 that the monitoring ECU 131 is not connected to the network bus 301, this is to prevent the monitoring ECU 131 from being attacked via the network bus 301. Therefore, it is desirable that the monitoring ECU 131 is not connected to the network bus, but the storage element 407 can be monitored even in a configuration in which the monitoring ECU 131 is connected to the network bus 301.

本発明は上記した実施形態に限定されるものではなく、様々な変形例が含まれる。上記実施形態は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施形態の構成の一部を他の実施形態の構成に置き換えることもできる。また、ある実施形態の構成に他の実施形態の構成を加えることもできる。また、各実施形態の構成の一部について、他の構成を追加・削除・置換することもできる。   The present invention is not limited to the embodiments described above, and includes various modifications. The above embodiment has been described in detail for easy understanding of the present invention, and is not necessarily limited to the one having all the configurations described. A part of the configuration of one embodiment can be replaced with the configuration of another embodiment. The configuration of another embodiment can be added to the configuration of a certain embodiment. Further, with respect to a part of the configuration of each embodiment, another configuration can be added, deleted, or replaced.

例えば各実施形態において、例えば車載ネットワークのように、ECU302がネットワークバス301からデータを受信完了するまで、CPU制御部405がそのデータを参照できないようなネットワークを想定したが、一般的なネットワークにおける電子制御装置に対して本発明を適用することを妨げるものではない。   For example, in each embodiment, a network in which the CPU control unit 405 cannot refer to the data until the ECU 302 completes reception of data from the network bus 301, such as an in-vehicle network, is assumed. This does not prevent the present invention from being applied to the control device.

上記各構成、機能、処理部、処理手段等は、それらの一部や全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリ、ハードディスク、SSD(Solid State Drive)等の記録装置、ICカード、SDカード、DVD等の記録媒体に格納することができる。   Each of the above-described configurations, functions, processing units, processing means, and the like may be realized in hardware by designing a part or all of them, for example, with an integrated circuit. Each of the above-described configurations, functions, and the like may be realized by software by interpreting and executing a program that realizes each function by the processor. Information such as programs, tables, and files for realizing each function can be stored in a recording device such as a memory, a hard disk, an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.

301:ネットワークバス、302:ECU、401:MainCPU、402:SubCPU、403:通信I/F、405:CPU制御部、406:I/O制御部、407:記憶素子、408:通信制御部。   301: Network bus, 302: ECU, 401: Main CPU, 402: SubCPU, 403: Communication I / F, 405: CPU control unit, 406: I / O control unit, 407: Storage element, 408: Communication control unit.

Claims (8)

電子機器の動作を制御する装置であって、
通信バスを介して他の電子機器との間でデータを送受信する通信制御部、
前記通信制御部と並行して前記通信バスとの間でデータを送受信するI/O制御部、
前記I/O制御部が前記通信バスから受信したデータが不正データであるか否かを判定する不正判定部、
を備え、
前記I/O制御部は、前記不正判定部が不正データであると判定したデータの受信確認フィールドを前記通信バスから受信する前に、前記不正データを無効化させる信号を前記通信バスに対して出力する
ことを特徴とする電子制御装置。
An apparatus for controlling the operation of an electronic device,
A communication control unit that transmits and receives data to and from other electronic devices via a communication bus;
An I / O control unit that transmits and receives data to and from the communication bus in parallel with the communication control unit;
A fraud determination unit for determining whether the data received from the communication bus by the I / O control unit is fraudulent data;
With
The I / O control unit sends a signal for invalidating the illegal data to the communication bus before receiving the reception confirmation field of the data determined by the fraud determination unit as illegal data from the communication bus. An electronic control device characterized by output.
前記電子制御装置は、前記通信制御部を介して前記他の電子機器から所定周期毎にデータを受信するように構成されたプロセッサを備え、
前記不正判定部は、前記I/O制御部が前記通信バスから前記所定周期よりも短い時間間隔でデータを受信した場合は、当該データは不正データであると判定する
ことを特徴とする請求項1記載の電子制御装置。
The electronic control device includes a processor configured to receive data from the other electronic device at predetermined intervals via the communication control unit,
The fraud determination unit determines that the data is fraudulent data when the I / O control unit receives data from the communication bus at a time interval shorter than the predetermined period. The electronic control device according to 1.
前記通信制御部は、CANプロトコルを用いて前記他の電子機器との間でデータを送受信するように構成されており、
前記I/O制御部は、前記不正判定部が不正データであると判定したデータのCRC境界フィールドをドミナントレベルに変更する信号を前記通信バスに対して出力することにより、前記不正データを無効化させる
ことを特徴とする請求項2記載の電子制御装置。
The communication control unit is configured to transmit / receive data to / from the other electronic device using a CAN protocol,
The I / O control unit invalidates the illegal data by outputting to the communication bus a signal for changing a CRC boundary field of data determined to be illegal data by the fraud determination unit to a dominant level. The electronic control device according to claim 2, wherein:
前記通信制御部は、CANプロトコルを用いて前記他の電子機器との間でデータを送受信するように構成されており、
前記I/O制御部は、前記不正判定部が不正データであると判定したデータの受信確認フィールドを前記通信バスから受信する前に、CANプロトコル上において前記不正データが無効データであるとみなされる個数以上のドミナントレベル信号を連続して前記通信バスに対して出力することにより、前記不正データを無効化させる
ことを特徴とする請求項2記載の電子制御装置。
The communication control unit is configured to transmit / receive data to / from the other electronic device using a CAN protocol,
The I / O control unit regards the invalid data as invalid data on the CAN protocol before receiving from the communication bus the reception confirmation field of the data determined by the fraud determination unit as the illegal data. The electronic control device according to claim 2, wherein the illegal data is invalidated by continuously outputting a dominant level signal equal to or greater than the number to the communication bus.
前記I/O制御部は、前記不正データを無効化させる信号を前記通信バスに対して出力した後、前記通信制御部が次のデータを前記通信バスから受信し始める前までに、前記不正データを無効化させる信号を停止する
ことを特徴とする請求項1記載の電子制御装置。
The I / O control unit outputs the signal for invalidating the illegal data to the communication bus and before the communication control unit starts receiving the next data from the communication bus. The electronic control device according to claim 1, wherein a signal for invalidating the signal is stopped.
前記電子制御装置は、前記不正判定部が正常動作しているか否かを示す監視信号を受信してその監視信号に基づき前記不正判定部の動作状態を判定する監視部を備え、
前記不正判定部は、メモリ装置内に格納された不正判定プログラムとして構成されており、
前記不正判定プログラムは、前記メモリ装置内のアドレスをジャンプしながら実行されるように構成されており、
前記不正判定プログラムは、最後の前記ジャンプを完了した後に、前記監視信号の信号レベルを反転させて前記監視部に対して出力し、
前記監視部は、前記不正判定プログラムの実行周期毎に前記監視信号の信号レベルが反転していない場合は、前記不正判定部が正常動作していない旨のアラートを出力する
ことを特徴とする請求項1記載の電子制御装置。
The electronic control device includes a monitoring unit that receives a monitoring signal indicating whether or not the fraud determination unit is operating normally and determines an operation state of the fraud determination unit based on the monitoring signal,
The fraud determination unit is configured as a fraud determination program stored in a memory device,
The fraud determination program is configured to be executed while jumping an address in the memory device,
The fraud determination program, after completing the last jump, inverts the signal level of the monitoring signal and outputs it to the monitoring unit,
The monitoring unit outputs an alert to the effect that the fraud determination unit is not operating normally when the signal level of the monitoring signal is not reversed every execution period of the fraud determination program. Item 2. The electronic control device according to Item 1.
請求項1記載の電子制御装置を複数備え、
いずれかの前記電子制御装置が備える前記不正判定部または前記I/O制御部が故障したときは、他の前記電子制御装置が備える前記不正判定部および前記I/O制御部が、故障した前記電子制御装置に代行して動作する
ことを特徴とする電子制御システム。
A plurality of electronic control devices according to claim 1,
When the fraud determination unit or the I / O control unit included in any one of the electronic control devices fails, the fraud determination unit and the I / O control unit included in the other electronic control device fail. An electronic control system that operates on behalf of an electronic control device.
請求項1記載の電子制御装置と、
前記不正判定部が正常動作しているか否かを示す監視信号を受信してその監視信号に基づき前記不正判定部の動作状態を判定する監視部を備えた第2電子制御装置と、
を有し、
前記不正判定部は、メモリ装置内に格納された不正判定プログラムとして構成されており、
前記不正判定プログラムは、前記メモリ装置内のアドレスをジャンプしながら実行されるように構成されており、
前記不正判定プログラムは、最後の前記ジャンプを完了した後に、前記監視信号の信号レベルを反転させて前記監視部に対して出力し、
前記監視部は、前記不正判定プログラムの実行周期毎に前記監視信号の信号レベルが反転していない場合は、前記不正判定部が正常動作していない旨のアラートを出力する
ことを特徴とする電子制御システム。
An electronic control device according to claim 1,
A second electronic control unit comprising a monitoring unit that receives a monitoring signal indicating whether or not the fraud determination unit is operating normally and determines an operation state of the fraud determination unit based on the monitoring signal;
Have
The fraud determination unit is configured as a fraud determination program stored in a memory device,
The fraud determination program is configured to be executed while jumping an address in the memory device,
The fraud determination program, after completing the last jump, inverts the signal level of the monitoring signal and outputs it to the monitoring unit,
The monitoring unit outputs an alert indicating that the fraud determination unit is not operating normally when the signal level of the monitoring signal is not reversed every execution period of the fraud determination program. Control system.
JP2013114617A 2013-05-30 2013-05-30 Electronic control device and electronic control system Pending JP2014236248A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013114617A JP2014236248A (en) 2013-05-30 2013-05-30 Electronic control device and electronic control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013114617A JP2014236248A (en) 2013-05-30 2013-05-30 Electronic control device and electronic control system

Publications (1)

Publication Number Publication Date
JP2014236248A true JP2014236248A (en) 2014-12-15

Family

ID=52138686

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013114617A Pending JP2014236248A (en) 2013-05-30 2013-05-30 Electronic control device and electronic control system

Country Status (1)

Country Link
JP (1) JP2014236248A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016158028A (en) * 2015-02-23 2016-09-01 株式会社デンソー Communication device and network system
WO2017056395A1 (en) * 2015-09-29 2017-04-06 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Illegality detection electronic control unit, vehicle onboard network system, and communication method
JP2017168993A (en) * 2016-03-15 2017-09-21 本田技研工業株式会社 Monitoring device and communication system
WO2018020833A1 (en) * 2016-07-28 2018-02-01 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Frame transmission blocking device, frame transmission blocking method and vehicle-mounted network system
JP2018026791A (en) * 2016-07-28 2018-02-15 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Frame transmission blocking device, frame transmission blocking method, and on-vehicle network system
JP6314277B1 (en) * 2017-08-30 2018-04-18 株式会社ヨコオ Antenna device
WO2018207551A1 (en) * 2017-05-12 2018-11-15 日立オートモティブシステムズ株式会社 Information processing device and anomaly response method
WO2019044924A1 (en) * 2017-08-30 2019-03-07 株式会社ヨコオ Antenna device
US10693905B2 (en) 2015-09-29 2020-06-23 Panasonic Intellectual Property Corporation Of America Invalidity detection electronic control unit, in-vehicle network system, and communication method
JP2020524951A (en) * 2017-06-23 2020-08-20 ローベルト ボツシユ ゲゼルシヤフト ミツト ベシユレンクテル ハフツングRobert Bosch Gmbh Method for detecting a disruption in a vehicle communication system by checking communication anomalies
JP2020174298A (en) * 2019-04-11 2020-10-22 株式会社デンソーテン Electronic control device and control method of electronic control device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001320396A (en) * 2000-05-11 2001-11-16 Nissan Motor Co Ltd Communications equipment
WO2005015850A1 (en) * 2003-07-31 2005-02-17 Nec Electronics (Europe) Gmbh Device and method for diagnosis in multi-channel-can-applications
JP2005176422A (en) * 2003-12-08 2005-06-30 Denso Corp Power generation controller for vehicle
JP2008236408A (en) * 2007-03-20 2008-10-02 Auto Network Gijutsu Kenkyusho:Kk Multiplex communication apparatus for vehicle
JP2011213210A (en) * 2010-03-31 2011-10-27 Denso Corp Electronic control unit and control system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001320396A (en) * 2000-05-11 2001-11-16 Nissan Motor Co Ltd Communications equipment
WO2005015850A1 (en) * 2003-07-31 2005-02-17 Nec Electronics (Europe) Gmbh Device and method for diagnosis in multi-channel-can-applications
JP2005176422A (en) * 2003-12-08 2005-06-30 Denso Corp Power generation controller for vehicle
JP2008236408A (en) * 2007-03-20 2008-10-02 Auto Network Gijutsu Kenkyusho:Kk Multiplex communication apparatus for vehicle
JP2011213210A (en) * 2010-03-31 2011-10-27 Denso Corp Electronic control unit and control system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
畑 正人 MASATO HATA: "CANにおける不正送信阻止方式の実装と評価 Implementation and Evaluation of A Method for Preventing", 電子情報通信学会技術研究報告 VOL.112 NO.342 IEICE TECHNICAL REPORT, vol. 第112巻, JPN6016037216, JP, pages 17, ISSN: 0003407021 *
畑 正人 MASATO HATA: "不正送信阻止:CANではそれが可能である How to Stop Unauthorized Transmission in Controller Area N", CSS2011コンピュータセキュリティシンポジウム2011論文集 併催 マルウェア対策研究人材育成ワ, vol. 第2011巻, JPN6016037217, JP, pages 627, ISSN: 0003407022 *

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016158028A (en) * 2015-02-23 2016-09-01 株式会社デンソー Communication device and network system
WO2017056395A1 (en) * 2015-09-29 2017-04-06 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Illegality detection electronic control unit, vehicle onboard network system, and communication method
US10693905B2 (en) 2015-09-29 2020-06-23 Panasonic Intellectual Property Corporation Of America Invalidity detection electronic control unit, in-vehicle network system, and communication method
JP2017168993A (en) * 2016-03-15 2017-09-21 本田技研工業株式会社 Monitoring device and communication system
US11356475B2 (en) 2016-07-28 2022-06-07 Panasonic Intellectual Property Corporation Of America Frame transmission prevention apparatus, frame transmission prevention method, and in-vehicle network system
JP2018026791A (en) * 2016-07-28 2018-02-15 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Frame transmission blocking device, frame transmission blocking method, and on-vehicle network system
CN109076001A (en) * 2016-07-28 2018-12-21 松下电器(美国)知识产权公司 Frame transmission prevents device, frame transmission prevention method and vehicle netbios
CN109076001B (en) * 2016-07-28 2021-10-01 松下电器(美国)知识产权公司 Frame transfer preventing device, frame transfer preventing method, and vehicle-mounted network system
WO2018020833A1 (en) * 2016-07-28 2018-02-01 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Frame transmission blocking device, frame transmission blocking method and vehicle-mounted network system
JP7027592B2 (en) 2016-07-28 2022-03-01 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Gateway equipment, methods and in-vehicle network systems
JP2021083125A (en) * 2016-07-28 2021-05-27 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Gateway device, method, and in-vehicle network system
WO2018207551A1 (en) * 2017-05-12 2018-11-15 日立オートモティブシステムズ株式会社 Information processing device and anomaly response method
JP2018194909A (en) * 2017-05-12 2018-12-06 日立オートモティブシステムズ株式会社 Information processing device and abnormality coping method
US11296970B2 (en) 2017-06-23 2022-04-05 Robert Bosch Gmbh Method for detecting a disruption in a vehicle's communication system by checking for abnormalities in communication
JP2020524951A (en) * 2017-06-23 2020-08-20 ローベルト ボツシユ ゲゼルシヤフト ミツト ベシユレンクテル ハフツングRobert Bosch Gmbh Method for detecting a disruption in a vehicle communication system by checking communication anomalies
JP6314277B1 (en) * 2017-08-30 2018-04-18 株式会社ヨコオ Antenna device
JP2019047192A (en) * 2017-08-30 2019-03-22 株式会社ヨコオ Antenna device
WO2019044924A1 (en) * 2017-08-30 2019-03-07 株式会社ヨコオ Antenna device
US11404767B2 (en) 2017-08-30 2022-08-02 Yokowo Co., Ltd. Antenna apparatus
JP2020174298A (en) * 2019-04-11 2020-10-22 株式会社デンソーテン Electronic control device and control method of electronic control device
JP7218234B2 (en) 2019-04-11 2023-02-06 株式会社デンソーテン ELECTRONIC CONTROLLER AND CONTROL METHOD OF ELECTRONIC CONTROLLER

Similar Documents

Publication Publication Date Title
JP2014236248A (en) Electronic control device and electronic control system
US20210312043A1 (en) Vehicle communications bus data security
JP6836340B2 (en) Fraud detection electronic control unit, in-vehicle network system and communication method
JP5919205B2 (en) Network device and data transmission / reception system
US11032300B2 (en) Intrusion detection system based on electrical CAN signal for in-vehicle CAN network
KR101472896B1 (en) Method and apparatus for enhancing security in in-vehicle communication network
WO2017038500A1 (en) Relay device
WO2015159520A1 (en) Vehicle-mounted network system, abnormality detection electronic control unit and abnormality detection method
WO2016185514A1 (en) Attack detection device
US11522878B2 (en) Can communication based hacking attack detection method and system
JP2018026791A (en) Frame transmission blocking device, frame transmission blocking method, and on-vehicle network system
US10764326B2 (en) Can controller safe against can-communication-based hacking attack
JP7182559B2 (en) Log output method, log output device and program
US20200014758A1 (en) On-board communication device, computer program, and message determination method
KR101972457B1 (en) Method and System for detecting hacking attack based on the CAN protocol
JP2019008618A (en) Information processing apparatus, information processing method, and program
US11888866B2 (en) Security module for a CAN node
CN112347023A (en) Security module for CAN node
Kwon et al. Mitigation mechanism against in-vehicle network intrusion by reconfiguring ECU and disabling attack packet
KR101714526B1 (en) Method and apparatus for protecting hacking in vehicle network
CN112583786B (en) Method for alarming, transmitter device and receiver device
KR102592201B1 (en) Method and Apparatus for Providing In-Vehicle Communication Security
WO2020105657A1 (en) Onboard relay device and relay method
WO2017056395A1 (en) Illegality detection electronic control unit, vehicle onboard network system, and communication method
JP2024041392A (en) electronic control unit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160204

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160916

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160927

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161107

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20170228