The present disclosure relates to a technique for sensing fraudulent frames transmitted within an in-vehicle network over which electronic control units perform communication.
Systems in recent automobiles accommodate multiple devices called electronic control units (ECUs). A network connecting these ECUs is called an in-vehicle network. There exist multiple in-vehicle network standards. Among all these standards, a standard called CAN (Controller Area Network) specified in ISO 11898-1 is one of the most mainstream in-vehicle network standards (see “CAN Specification 2.0 Part A”, [online], CAN in Automation (CiA), [searched Nov. 14, 2014], the Internet (URL:http://www.can-cia.org/fileadmin/cia/specifications/CAN20A.pdf)).
In CAN, each communication path is constituted by two buses, and ECUs connected to the buses are referred to as nodes. Each node connected to a bus transmits and receives a message called a frame. A transmitting node that is to transmit a frame applies a voltage to two buses to generate a potential difference between the buses, thereby transmitting the value “1” called recessive and the value “0” called dominant. When a plurality of transmitting nodes transmit recessive and dominant values at completely the same timing, the dominant value is prioritized and transmitted. A receiving node transmits a frame called an error frame if the format of a received frame is anomalous. In an error frame, 6 consecutive dominant bits are transmitted to notify the transmitting nodes or any other receiving node of frame anomaly.
In CAN, furthermore, there is no identifier that designates a transmission destination or a transmission source. A transmitting node transmits frames each assigned an ID called a message ID (that is, sends signals to a bus), and each receiving node receives only a predetermined message ID (that is, reads a signal from the bus). In addition, the CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance) scheme is adopted, and arbitration based on message IDs is performed for simultaneous transmission of a plurality of nodes so that a frame with the value of message ID being small is preferentially transmitted.
There is also known a technique in which, in a case where a message that is anomalous is transmitted to a CAN bus, a gateway device detects the anomalous message and prevents the anomalous message from being transferred to any other bus to suppress an increase in the load on buses (see Japanese Unexamined Patent Application Publication No. 2007-38904).
Incidentally, a connection of a fraudulent node to a bus in an in-vehicle network and a fraudulent transmission of a frame (message) from the fraudulent node can possibly cause fraudulent control of the vehicle body. To suppress such a possibility, there is a need for sensing of a fraudulent message.
One non-limiting and exemplary embodiment provides a fraud-sensing electronic control unit (fraud-sensing ECU) for efficient sensing of a fraudulent message to be transmitted to a bus, in order to, for example, reduce consumption of an in-vehicle battery, in an in-vehicle network system in which communication is established in accordance with the CAN protocol or the like. The present disclosure further provides a fraud sensing method for efficient sensing of a fraudulent message, and an in-vehicle network system including a fraud-sensing ECU.
In one general aspect, the techniques disclosed here feature a fraud sensing method according to an aspect of the present disclosure is a fraud sensing method for use in an in-vehicle network system including a plurality of first electronic control units that communicate with each other via one or more buses. The fraud sensing method includes detecting that a state of a vehicle including the in-vehicle network system satisfies a first condition or a second condition, and switching an operation mode of a second electronic control unit connected to the one or more buses (i) from a first mode in which a first type of sensing process for sensing a fraudulent message in the one or more buses is performed to a second mode in which the first type of sensing process is not performed, upon detecting, in the detecting, that the state of the vehicle satisfies the first condition, and (ii) from the second mode to the first mode, upon detecting, in the detecting, that the state of the vehicle satisfies the second condition.
It should be noted that general or specific embodiments may be implemented as a system, an apparatus, an integrated circuit, a computer program, a computer-readable recording medium such as a compact disc read-only memory (CD-ROM), or any selective combination of the system, the apparatus, the integrated circuit, the computer program, and the recording medium.
According to an embodiment of the present disclosure, for example, a transmission of a fraudulent message from a fraudulent node connected to a bus in an in-vehicle network system driven by the power of an in-vehicle battery or the like would be sensible, and the sensing operation is omitted under a certain condition in accordance with the state of the vehicle, which may reduce consumption of the battery.
Additional benefits and advantages of the disclosed embodiments will become apparent from the specification and drawings. The benefits and/or advantages may be individually obtained by the various embodiments and features of the specification and drawings, which need not all be provided in order to obtain one or more of such benefits and/or advantages.
A fraud sensing method according to an aspect of the present disclosure is a fraud sensing method for use in an in-vehicle network system including a plurality of electronic control units that communicate with each other via one or more buses. The fraud sensing method includes detecting that a state of a vehicle provided with the in-vehicle network system satisfies a certain condition, and switching, upon detecting, in the detecting, that the state of the vehicle satisfies the certain condition, an operation mode of a fraud-sensing electronic control unit connected to the bus(es) between a first mode in which a predetermined type of sensing process for sensing a fraudulent message in the bus(es) is performed and a second mode in which the predetermined type of sensing process is not performed. The fraud-sensing electronic control unit (fraud-sensing ECU) is connected to a bus, and has a function of executing a predetermined type of sensing process for sensing a fraudulent message transmitted on the bus. Whether or not a message is fraudulent is judged in a sensing process on the basis of whether or not a predetermined condition is met. For example, in a case where the fraud-sensing ECU is capable of performing only one type of sensing process, whether or not to perform the sensing process is switched depending on the operation mode. This fraud sensing method allows the fraud-sensing ECU to omit a predetermined type of sensing process of a fraudulent message under a certain condition in accordance with the state of the vehicle, and may thus reduce consumption of the battery of the vehicle.
The plurality of electronic control units may perform communication via the bus(es) in accordance with a Controller Area Network (CAN) protocol. This may limit a period during which the fraud-sensing ECU senses a fraud when a fraudulent frame is transmitted from a fraudulent ECU connected to an in-vehicle network system in which communication is established in accordance with the CAN protocol, in accordance with the state of the vehicle, and may thus reduce the amount of power consumption.
In the detecting, one electronic control unit among the plurality of electronic control units may perform the detection described above. In the switching, the one electronic control unit that has performed the detection described above in the detecting may transmit a switching instruction message, and the fraud-sensing electronic control unit may switch the operation mode upon receipt of the switching instruction message. It is sufficient that, for example, the fraud-sensing ECU detect a switching instruction message (that is, a trigger frame that triggers switching of the operation mode) in the second mode in which a sensing process for sensing a fraudulent message is not performed. That is, the fraud-sensing ECU may not necessarily include a detection unit (such as a sensor) for directly detecting the state of the vehicle.
Furthermore, in the detecting, when the one electronic control unit senses a fraudulent message in the bus, it may be determined that the state of the vehicle satisfies the certain condition and the detection described above may be performed. In the switching, when the detection described above is performed in the detecting, the one electronic control unit may transmit a switching instruction message indicating switching to the first mode, and the fraud-sensing electronic control unit may switch the operation mode to the first mode upon receipt of the switching instruction message. Accordingly, upon detecting that a fraudulent message has been transmitted on a certain bus, the fraud-sensing ECU is brought into the first mode (a check mode for sensing a fraudulent message) so that a fraudulent message in a bus to which the fraud-sensing ECU is connected is sensed.
Furthermore, in the detecting, when the one electronic control unit senses no fraudulent message in the bus within a certain period, it may be determined that the state of the vehicle satisfies the certain condition and the detection described above may be performed. In the switching, when the detection described above is performed in the detecting, the one electronic control unit may transmit a switching instruction message indicating switching to the second mode, and the fraud-sensing electronic control unit may switch the operation mode to the second mode upon receipt of the switching instruction message. Accordingly, upon detecting that no fraudulent message has been transmitted on a certain bus within a certain period, the fraud-sensing ECU is brought into the second mode (a standby mode for not sensing a fraudulent message), which may reduce the amount of power consumption.
The certain condition may be start of use of the vehicle. In the switching, the operation mode may be switched to the first mode when the start of the use of the vehicle is detected in the detecting. Examples of the use of the vehicle include movement of the vehicle by a user, and preparation for movement of the vehicle (such as opening a door, entering the vehicle, or activating the engine). In addition, for example, when movement of the vehicle is no longer necessary, the use of the vehicle is finished by, for example, parking the vehicle (such as stopping the engine) or exiting the vehicle. Note that while the vehicle is parked in a location other than a specific parking space such as the user's parking space at home (while the vehicle is parked at a filling station or in any other location away from home), even parking and exiting the vehicle may not mean the end of the use of the vehicle. This enables the fraud-sensing ECU to enter the first mode (a check mode for sensing a fraudulent message) in response to the start of the use of the vehicle, so that a fraudulent message in a bus to which the fraud-sensing ECU is connected can be sensed. Accordingly, for example, even if a fraudulent ECU is added to the in-vehicle network system while the user parks and leaves the vehicle, a fraud can be sensed when a fraudulent message is transmitted from the fraudulent ECU after the user comes back to the vehicle and starts to use the vehicle.
Alternatively, the start of the use of the vehicle may be detected by detecting an activation of an engine installed in the vehicle. This enables the fraud-sensing ECU to be ready to sense a fraudulent message when the engine is activated. Accordingly, for example, even if a fraudulent ECU is added to the in-vehicle network system while the user parks and leaves the vehicle, a fraud can be sensed when a fraudulent message is transmitted from the fraudulent ECU after the user comes back to the vehicle and activates the engine.
The fraud sensing method may further include switching the operation mode to the second mode when a predetermined period of time has elapsed since the start of the use of the vehicle after the operation mode has been switched to the first mode in the switching. This enables the fraud-sensing ECU to enter the second mode (a standby mode for not sensing a fraudulent message) unconditionally or under certain conditions when a predetermined period of time has elapsed since the start of the use of the vehicle, which may reduce the amount of power consumption.
The certain condition may also be that any of the plurality of electronic control units becomes ready to start communication with a device outside the vehicle, and the switching may switch the operation mode to the first mode upon detecting, in the detecting, that any of the plurality of electronic control units becomes ready to start the communication. This enables the fraud-sensing ECU to become ready to sense a fraudulent message when communication with the outside is started. This makes a fraudulent message (frame) quickly sensible if, for example, the head unit and the like in the in-vehicle network system are attacked from an external device and the fraudulent message (frame) comes from the outside. Additionally, the supply of a program or the like from the outside to transmit a fraudulent message may also be addressed.
The certain condition may also be that any of the plurality of electronic control units has completed communication with a device outside the vehicle and has entered a certain state after the completion of the communication, and the switching may switch the operation mode to the second mode upon detecting, in the detecting, that the certain state has been entered after the end of the communication. This enables the sensing of a fraudulent message to be omitted to reduce consumption of the battery when communication with the outside is completed and the transmission of a fraudulent message on a bus becomes less likely to occur. Specific examples of the case where the transmission of a fraudulent message becomes less likely to occur include a case where the communication has been interrupted, and a case where a certain period of time (for example, several minutes) has elapsed since the end of the communication.
In the in-vehicle network system, a plurality of buses may be used for communication of the plurality of electronic control units, and the in-vehicle network system may further include a gateway device having a function of transferring a message between the plurality of buses. In the detecting, one electronic control unit among the plurality of electronic control units which is connected to a bus different from that to which the fraud-sensing electronic control unit is connected may perform the detection described above. In the switching, the one electronic control unit which has performed the detection described above in the detecting may transmit a switching instruction message, and the fraud-sensing electronic control unit may switch the operation mode upon receipt of the switching instruction message transferred to the gateway device. Accordingly, in accordance with a state of the vehicle which has been detected by an ECU connected to one bus in the in-vehicle network system, each fraud-sensing ECU connected to each of one or more other buses can switch its operation mode.
In the detecting, furthermore, an input related to whether or not it is necessary to switch the operation mode may be accepted through a predetermined user interface when the state of the vehicle changes, and when the input indicates that it is necessary to switch the operation mode, it may be determined that the state of the vehicle satisfies the certain condition and the detection described above may be performed. This enables the user's judgment to be reflected in the switching of the operation mode of the fraud-sensing ECU, and allows appropriate switching of the operation mode in accordance with the user's intentions and the like.
In the second mode, a type of sensing process having a different degree to which a fraudulent message is sensible than the predetermined type of sensing process may be performed. For example, in a case where the fraud-sensing ECU is capable of executing both a first type of sensing process with a relatively large amount of processing and a second type of sensing process with a relatively small amount of processing in order to sense a fraudulent message, whether to perform the first type of sensing process or the second type of sensing process is switched depending on the operation mode. This enables the fraud-sensing ECU to omit a predetermined type of sensing process (for example, the first type of sensing process) of a fraudulent message under a certain condition in accordance with the state of the vehicle, and may thus reduce consumption of the battery of the vehicle. The amount of processing in the sensing process performed by the fraud-sensing ECU is not necessarily proportional to the degree to which a fraud is sensible but almost tends to be related to the degree to which a fraudulent message is sensible. It is thus useful that, for example, the operation mode be switched so that, for example, a sensing process with an almost high degree to which a fraud is sensible and with a large amount of processing is executed in a certain case and a sensing process with a smaller amount of processing is performed otherwise.
An in-vehicle network system according to another aspect of the present disclosure is an in-vehicle network system including a plurality of electronic control units that communicate with each other via one or more buses, and a fraud-sensing electronic control unit connected to the bus(es). The in-vehicle network system further includes a detection unit that detects that a state of a vehicle provided with the in-vehicle network system satisfies a certain condition, and a switching unit that switches, upon the detection unit detecting that the state of the vehicle satisfies the certain condition, an operation mode of the fraud-sensing electronic control unit connected to the bus(es) between a first mode in which a predetermined type of sensing process for sensing a fraudulent message in the bus(es) is performed and a second mode in which the predetermined type of sensing process is not performed. This enables the fraud-sensing ECU to omit a predetermined type of sensing process of a fraudulent message under a certain condition in accordance with the state of the vehicle, and may thus reduce consumption of the battery of the vehicle.
A fraud-sensing electronic control unit (fraud-sensing ECU) according to still another aspect of the present disclosure is a fraud-sensing electronic control unit to be connected to a bus used for communication by a plurality of electronic control units that communicate with each other via one or more buses. The fraud-sensing electronic control unit includes one or more memories and circuitry which, in operation, detects that a state of a vehicle provided with the plurality of electronic control units satisfies a certain condition, and switches, upon detecting, in the detecting, that the state of the vehicle satisfies the certain condition, an operation mode of the fraud-sensing electronic control unit between a first mode in which a predetermined type of sensing process for sensing a fraudulent message in the bus(es) is performed and a second mode in which the predetermined type of sensing process is not performed. This enables the fraud-sensing ECU to omit a predetermined type of sensing process of a fraudulent message under a certain condition in accordance with the state of the vehicle, and may thus reduce consumption of the battery of the vehicle.
It should be noted that these general or specific aspects may be implemented as a system, a method, an integrated circuit, a computer program, or a computer-readable recording medium such as a CD-ROM, or may be implemented as any combination of the system, the method, the integrated circuit, the computer program, or the recording medium.
In the following, an in-vehicle network system, a fraud-sensing ECU, and the like according to embodiments will be described with reference to the drawings. Each of the embodiments described below shows a specific example of the present disclosure. Thus, the numerical values, shapes, materials, constituent elements, the arrangement and connection of the constituent elements, steps (processes), the processing order of the steps, etc. shown in the following embodiments are mere examples, and do not limit the scope of the present disclosure. Among the constituent elements in the following embodiments, constituent elements not recited in any one of the independent claims are constituent elements that can be optionally added. In addition, the drawings are schematic and not representative of exact proportions or dimensions.
An embodiment of the present disclosure will now be described with reference to the drawings in the context of an in-vehicle network system 10 including a fraud-sensing ECU that implements an anti-fraud method for preventing a process based on a fraudulent frame from being executed on any other node (ECU) by using message IDs.
The fraud-sensing ECUs 100a and 100b are ECUs connected to the bus 500a and the bus 500b, respectively, and having a function of determining whether frames transmitted from the ECUs 400a to 400d, etc. are fraudulent or not and transmitting an error frame if the frames are fraudulent.
The ECUs 400a to 400d are each connected to any bus, and are connected to an engine 401, brakes 402, a door open/close sensor 403, and a window open/close sensor 404, respectively. Each of the ECUs 400a to 400d obtains the state of the device connected thereto (such as the engine 401), and periodically transmits a frame (data frame described below) or the like indicating the state to a network (that is, the bus).
The gateway 300 is connected to the bus 500a to which the fraud-sensing ECU 100a, the ECU 400a, and the ECU 400b are coupled, the bus 500b to which the fraud-sensing ECU 100b, the ECU 400c, and the ECU 400d are coupled, and the bus 500c to which the head unit 200 is coupled, and has a function of transferring frames received from the respective buses to other buses. It is also possible to switch for each connected bus between whether or not to transfer a received frame. The gateway 300 is also a kind of ECU.
The head unit 200 has a function of receiving a frame, and has a function of receiving frames transmitted from the ECUs 400a to 400d and displaying various states on a display (not illustrated) to present the states to a user. The head unit 200 is also a kind of ECU.
In the in-vehicle network system 10, each ECU exchanges frames in accordance with the CAN protocol. There are the following frames in the CAN protocol: a data frame, a remote frame, an overload frame, and an error frame. The description will first focus on the data frame and the error frame, for convenience of illustration.
A description will now be given of the data frame, which is a frame used in a network compliant with the CAN protocol.
The SOF is made up of one dominant bit. The recessive value is set for a state where a bus is idle, and is changed to the dominant value by the SOF to indicate the start of frame transmission.
The ID field is a field made up of 11 bits for storing an ID (message ID) that is a value indicating a type of data. It is designed such that a high priority is placed on a frame whose ID has a small value in order to use the ID field to arbitrate communication when a plurality of nodes simultaneously start transmission.
The RTR is a value for identifying a data frame and a remote frame, and is made up of one dominant bit for a data frame.
The IDE and “r” are both made up of one dominant bit.
The DLC is made up of 4 bits, and is a value indicating the length of the data field. The IDE, “r”, and the DLC are collectively referred to as a control field.
The data field is a value made up of up to 64 bits, indicating the content of data to be transmitted. The length is adjustable every 8 bits. The specification of data to be sent is not specified in the CAN protocol and is defined in the in-vehicle network system 10. Accordingly, the specification is dependent on the type of vehicle, the manufacturer (producer), and so forth.
The CRC sequence is made up of 15 bits. The CRC sequence is calculated by using transmission values of the SOF, the ID field, the control field, and the data field.
The CRC delimiter is a delimiter made up of one recessive bit, indicating the end of the CRC sequence. The CRC sequence and the CRC delimiter are collectively referred to as a CRC field.
The ACK slot is made up of 1 bit. A transmitting node sets the recessive value in the ACK slot when transmitting the frame. A receiving node sets the dominant value in the ACK slot and transmits the frame if the receiving node has been able to correctly receive the frame up to the CRC sequence. Since the dominant value overrides the recessive value, if the ACK slot is constituted by the dominant value after transmission, the transmitting node can confirm that any receiving node has been successful in receiving the frame.
The ACK delimiter is a delimiter made up of one recessive bit, indicating the end of the ACK.
The EOF is made up of 7 recessive bits, and indicates the end of the data frame.
The error flag (primary) is used to inform any other node of the occurrence of an error. A node that has sensed an error transmits 6 consecutive dominant bits in order to inform any other node of the occurrence of the error. This transmission violates a bit-stuffing rule (in which the same value should not be transmitted over 6 or more consecutive bits) in the CAN protocol, and induces the transmission of an error frame (secondary) from any other node.
The error flag (secondary) is made up of 6 consecutive dominant bits, which is used to inform any other node of the occurrence of an error. All the nodes that have received the error flag (primary) and sensed the violation of the bit-stuffing rule transmit an error flag (secondary).
The error delimiter “DEL” is made up of 8 consecutive recessive bits, and indicates the end of the error frame.
The head unit 200 is a kind of ECU disposed on, for example, an instrument panel or the like of an automobile, including a display device such as a liquid crystal display (LCD) for displaying information to be viewed by a driver, an input unit that accepts the operation of the driver, and so forth.
The frame transceiving unit 270 transmits and receives a frame compliant with the CAN protocol to and from the bus 500c. The frame transceiving unit 270 receives a frame from the bus 500c bit-by-bit, and transfers the frame to the frame interpretation unit 260. Further, the frame transceiving unit 270 transmits the content of a frame of which the frame transceiving unit 270 has been notified by the frame generation unit 230 to the bus 500c bit-by-bit.
The frame interpretation unit 260 receives the values of the frame from the frame transceiving unit 270, and interprets and maps the values into the respective fields in the frame formats specified in the CAN protocol. The frame interpretation unit 260 transfers a value judged to correspond to the ID field to the reception-ID judgment unit 240. In accordance with a determination result sent from the reception-ID judgment unit 240, the frame interpretation unit 260 determines whether to transfer the value in the ID field and the data field that appears after the ID field to the frame processing unit 220 or to abort reception of the frame (that is, abort interpretation of the frame) after the determination result has been received. Further, the frame interpretation unit 260 notifies the frame generation unit 230 that the frame generation unit 230 is requested to transmit an error frame if the frame is judged not to comply with the CAN protocol, for example, if the values of the CRC do not match or if an item whose value should be fixed to the dominant value has the recessive value. Further, when an error frame is received, that is, when an error frame is interpreted to have started from a value in the received frame, the frame interpretation unit 260 discards the subsequent part of the frame, that is, aborts interpretation of the frame. For example, in a case where an error frame is interpreted to have started in the middle of the data frame, the interpretation of the data frame is aborted and a particular process is not performed according to the data frame.
The reception-ID judgment unit 240 receives the value in the ID field sent from the frame interpretation unit 260, and determines whether or not to receive the respective fields of the frame after the ID field, in accordance with a list of message IDs held in the reception-ID list holding unit 250. The reception-ID judgment unit 240 notifies the frame interpretation unit 260 of the determination result.
The reception-ID list holding unit 250 holds a reception-ID list that is a list of IDs (message IDs) which the head unit 200 receives.
On the basis of the content of the received frame (for example, the content of the message ID and the data field), for example, the frame processing unit 220 forms an image to be displayed on the LCD and notifies the display control unit 210 of the image. The frame processing unit 220 may hold the content of the received data field and select and notify an image to be displayed on the LCD (for example, an image for displaying the vehicle speed, an image for displaying the open or closed state of a window, etc.) in accordance with the operation of the driver which has been accepted through the input unit.
The display control unit 210 displays, on the LCD or the like, the content of which the display control unit 210 has been notified by the frame processing unit 220.
In accordance with a notification of instructions from the frame interpretation unit 260 to transmit an error frame, the frame generation unit 230 forms an error frame and notifies the frame transceiving unit 270 of the error frame for transmission.
The frame transceiving unit 360 transmits and receives a frame compliant with the CAN protocol to and from each of the buses 500a, 500b, and 500c. The frame transceiving unit 360 receives a frame from a bus bit-by-bit, and transfers the frame to the frame interpretation unit 350. Further, the frame transceiving unit 360 transmits the content of the frame to the buses 500a, 500b, and 500c bit-by-bit on the basis of the frame and bus information indicating a bus at the transfer destination of which the frame transceiving unit 360 has been notified by the frame generation unit 320.
The frame interpretation unit 350 receives the values of the frame from the frame transceiving unit 360, and interprets and maps the values into the respective fields in the frame formats specified in the CAN protocol. The frame interpretation unit 350 transfers a value judged to correspond to the ID field to the reception-ID judgment unit 330. In accordance with a determination result sent from the reception-ID judgment unit 330, the frame interpretation unit 350 determines whether to transfer the value in the ID field and the data field (data) that appears after the ID field to the transfer processing unit 310 or to abort reception of the frame (that is, abort interpretation of the frame) after the determination result has been received. Further, the frame interpretation unit 350 notifies the frame generation unit 320 that the frame generation unit 320 is requested to transmit an error frame if the frame is judged not to comply with the CAN protocol. Further, when an error frame is received, that is, when an error frame is interpreted to have started from a value in the received frame, the frame interpretation unit 350 discards the subsequent part of the frame, that is, aborts interpretation of the frame.
The reception-ID judgment unit 330 receives the value in the ID field sent from the frame interpretation unit 350, and determines whether or not to receive the respective fields of the frame after the ID field, in accordance with a list of message IDs held in the reception-ID list holding unit 340. The reception-ID judgment unit 330 notifies the frame interpretation unit 350 of the determination result.
The reception-ID list holding unit 340 holds a reception-ID list (see
The transfer processing unit 310 determines a bus to which transfer is made in accordance with transfer rules held in the transfer rule holding unit 370 on the basis of the message ID of the received frame, and notifies the frame generation unit 320 of bus information indicating the bus to which transfer is made and the message ID and data sent from the frame interpretation unit 350. Note that the gateway 300 does not transfer an error frame received from a certain bus to any other bus.
The transfer rule holding unit 370 holds transfer rules that are information representing rules for the transfer of frames to the respective buses.
In accordance with a notification of instructions to transmit an error frame, which is sent from the frame interpretation unit 350, the frame generation unit 320 forms an error frame and notifies the frame transceiving unit 360 of the error frame for transmission. Further, the frame generation unit 320 forms a frame by using the message ID and data sent from the transfer processing unit 310, and notifies the frame transceiving unit 360 of the frame and the bus information.
The frame transceiving unit 460 transmits and receives a frame compliant with the CAN protocol to and from the bus 500a. The frame transceiving unit 460 receives a frame from the bus 500a bit-by-bit, and transfers the frame to the frame interpretation unit 450. Further, the frame transceiving unit 460 transmits the content of a frame of which the frame transceiving unit 460 has been notified by the frame generation unit 420 to the bus 500a.
The frame interpretation unit 450 receives the values of the frame from the frame transceiving unit 460, and interprets and maps the values into the respective fields in the frame formats specified in the CAN protocol. The frame interpretation unit 450 transfers a value judged to correspond to the ID field to the reception-ID judgment unit 430. In accordance with a determination result sent from the reception-ID judgment unit 430, the frame interpretation unit 450 determines whether to transfer the value in the ID field and the data field that appears after the ID field to the frame processing unit 410 or to abort reception of the frame (that is, abort interpretation of the frame) after the determination result has been received. Further, the frame interpretation unit 450 notifies the frame generation unit 420 that the frame generation unit 420 is requested to transmit an error frame if the frame is judged not to comply with the CAN protocol. Further, when an error frame is received, that is, when an error frame is interpreted to have started from a value in the received frame, the frame interpretation unit 450 discards the subsequent part of the frame, that is, aborts interpretation of the frame.
The reception-ID judgment unit 430 receives the value in the ID field sent from the frame interpretation unit 450, and determines whether or not to receive the respective fields of the frame after the ID field, in accordance with a list of message IDs held in the reception-ID list holding unit 440. The reception-ID judgment unit 430 notifies the frame interpretation unit 450 of the determination result.
The reception-ID list holding unit 440 holds a reception-ID list that is a list of IDs (message IDs) which the ECU 400a receives.
The frame processing unit 410 performs a process related to a function that is different for each ECU in accordance with the data of the received frame. For example, the ECU 400a connected to the engine 401 has a function of sounding an alarm when a door is open while the vehicle speed is over 30 km per hour. The ECU 400a includes, for example, a speaker or the like for sounding an alarm. The frame processing unit 410 of the ECU 400a manages data (for example, information indicating the state of the doors) received from any other ECU, and performs processes such as a process for sounding an alarm in a certain condition on the basis of the average speed per hour obtained from the engine 401.
The data obtaining unit 470 obtains data indicating the state of the elements connected to the ECUs, such as devices and sensors, and notifies the frame generation unit 420 of the data.
In accordance with a notification of instructions to transmit an error frame, which is sent from the frame interpretation unit 450, the frame generation unit 420 forms an error frame and notifies the frame transceiving unit 460 of the error frame for transmission. Further, the frame generation unit 420 adds a predetermined message ID to the value of the data sent from the data obtaining unit 470 to form a frame, and notifies the frame transceiving unit 460 of the frame.
Each of the ECUs 400b to 400d also has a configuration basically similar to that of the ECU 400a described above. However, the reception-ID list held in the reception-ID list holding unit 440 may have content different from one ECU to another. The ECU 400b holds the reception-ID list illustrated by way of example in
The frame transceiving unit 160 transmits and receives a frame compliant with the CAN protocol to and from the bus 500a. That is, the frame transceiving unit 160 serves as a so-called receiving unit that receives a frame when frame transmission on a bus is started, and serves as a so-called transmitting unit that transmits an error frame and the like to a bus. That is, the frame transceiving unit 160 receives a frame from the bus 500a bit-by-bit, and transfers the frame to the frame interpretation unit 150. Further, the frame transceiving unit 160 transmits the content of a frame of which the frame transceiving unit 160 has been notified by the frame generation unit 140 to the bus 500a.
The frame interpretation unit 150 receives the values of the frame from the frame transceiving unit 160, and interprets and maps the values into the respective fields in the frame formats specified in the CAN protocol. The frame interpretation unit 150 transfers a value judged to correspond to the ID field to the fraudulent frame sensing unit 130. Further, the frame interpretation unit 150 notifies the frame generation unit 140 that the frame generation unit 140 is requested to transmit an error frame if the frame is judged not to comply with the CAN protocol. Further, when an error frame is received, that is, when an error frame is interpreted to have started from a value in the received frame, the frame interpretation unit 150 discards the subsequent part of the frame, that is, aborts interpretation of the frame.
The fraudulent frame sensing unit 130 receives the value in the ID field sent from the frame interpretation unit 150, and determines whether or not the value in the ID field meets a predetermined condition indicating a fraud. That is, the fraudulent frame sensing unit 130 functions as a so-called determination unit that determines whether or not the content of a predetermined field in a received frame meets a predetermined condition indicating a fraud. The predetermined condition indicating a fraud is a condition in which the value in the ID field is not found in the list of message IDs held in the authorized-ID list holding unit 120. That is, the fraudulent frame sensing unit 130 determines whether the sent value (message ID) of the ID field is fraudulent or not, in accordance with the list of message IDs held in the authorized-ID list holding unit 120. If a message ID which is not found in this list (that is, an authorized-ID list described below) is received, the fraudulent frame sensing unit 130 notifies the fraud-sensing counter holding unit 110 of the received message ID in order to increment the number of times a fraud has been sensed. If a message ID which is not found in the authorized-ID list is received, the fraudulent frame sensing unit 130 further notifies the frame generation unit 140 that the frame generation unit 140 is requested to transmit an error frame. Further, when the number of times a fraud has been sensed reaches a certain number or more, the fraudulent frame sensing unit 130 is notified of this by the fraud-sensing counter holding unit 110, and notifies the frame generation unit 140 that the frame generation unit 140 is requested to transmit an error display message (frame) indicating the presence of a fraudulent ECU that issues the corresponding message ID. The message ID of the error display message is determined in advance, and the head unit 200 is configured to receive the message (frame) of the message ID and to provide error display. Although the error display message is not described herein for convenience of illustration, the message ID of the error display message is listed in the reception-ID lists held in the gateway 300 and the head unit 200 and in the authorized-ID list described below. Note that the message ID for the error display message is not illustrated in
The authorized-ID list holding unit 120 holds an authorized-ID list that is a list defining in advance message IDs included in frames to be transmitted on the bus 500a in the in-vehicle network system 10 (see
The fraud-sensing counter holding unit 110 holds a fraud-sensing counter for counting the number of times sensing has been performed for each message ID, and, upon being notified of a message ID by the fraudulent frame sensing unit 130, increments (increases) the corresponding fraud-sensing counter. When a fraud-sensing counter reaches a certain number (a predetermined number of times sensing has been performed) or more, the fraud-sensing counter holding unit 110 notifies the fraudulent frame sensing unit 130 that the certain number has been exceeded. Examples of the term “certain number (predetermined number of times sensing has been performed)”, as used herein, include a value determined in accordance with handling rules for a transmission error counter in the CAN protocol. In the CAN protocol, the transmission error counter counts up by 8 each time an ECU blocks transmission by using an error frame. As a result, when a transmission error counter in a transmitting node counts up to 128, the transmitting node is specified to transition to a passive state so that frame transmission is no longer performed. Accordingly, setting the certain number to 17, which is larger than 128/8 (=16), allows an error display message to be transmitted from the fraud-sensing ECU 100a when the presence of a transmitting node (fraudulent ECU) that ignores a rule related to a transmission error counter in the CAN protocol is estimated. If a fraudulent ECU that transmits a fraudulent frame follows a rule related to a transmission error counter in the CAN protocol, the transmission of an error frame from the fraud-sensing ECU 100a causes the transmission error counter of the fraudulent ECU to increment by 8. In this case, when the transmission error counter of the fraudulent ECU increases up to 128 due to the repeated transmission of a fraudulent frame, the fraudulent ECU transitions to the passive state to stop a fraudulent frame from being transmitted from the fraudulent ECU.
In accordance with a notification of instructions to transmit an error frame, which is sent from the frame interpretation unit 150, the frame generation unit 140 forms an error frame and notifies the frame transceiving unit 160 of the error frame for transmission. In addition, in accordance with a notification of instructions to transmit an error frame, which is sent from the fraudulent frame sensing unit 130, the frame generation unit 140 forms an error frame and notifies the frame transceiving unit 160 of the error frame for transmission. In accordance with a notification of instructions to transmit an error display message, which is sent from the fraudulent frame sensing unit 130, furthermore, the frame generation unit 140 notifies the frame transceiving unit 160 of an error display message for transmission.
A description will now be given of the operation of the fraud-sensing ECU 100a, the ECU 400a, the ECU 400b, the gateway 300, and so forth connected to the bus 500a in the in-vehicle network system 10 having the configuration described above in a case where a fraudulent ECU is connected to the bus 500a.
First, a fraudulent ECU starts to transmit a data frame whose message ID is “4” and data is “255 (0xFF)” (sequence S1001). The values of the bits included in the frame are sequentially delivered to the bus 500a in the order of the SOF, the ID field (message ID), etc. in accordance with the data frame format described above.
When the fraudulent ECU completes the delivery of the frame up to the ID field (message ID) to the bus 500a, each of the fraud-sensing ECU 100a, the ECU 400a, the ECU 400b, and the gateway 300 receives a message ID (sequence S1002).
Each of the ECU 400a, the ECU 400b, and the gateway 300 checks the message ID by using the reception-ID list held therein (sequence S1003). At this time, the fraud-sensing ECU 100a checks the message ID by using the authorized-ID list held therein (sequence S1004). That is, the fraud-sensing ECU 100a determines whether or not the content of the ID field in the transmitted frame meets a predetermined condition (in which the content is not listed in the authorized-ID list) indicating a fraud.
In sequence S1003, the ECU 400a and the ECU 400b terminate reception since the respectively held reception-ID lists do not include “4” (see
Subsequently to sequence S1003, the gateway 300 continues the reception of the frame. For example, while the fraud-sensing ECU 100a is preparing the issuance of an error frame, the part subsequent to the ID field, namely, the RTR and the control field (IDE, r, DLC), is sequentially delivered to the bus 500a from the fraudulent ECU, and then the data field is sequentially delivered bit-by-bit. The gateway 300 receives the RTR and the control field (IDE, r, DLC), and then starts the reception of the data field (sequence S1006).
Then, the preparation of the issuance of an error frame is completed, and the fraud-sensing ECU 100a transmits an error frame (sequence S1007). The transmission of the error frame is performed before the transmission of the end of the fraudulent frame (for example, before the transmission of the end of the CRC sequence). In the illustrated example operation, the error frame is transmitted in the middle of the data field. The transmission of the error frame is started, thus allowing the middle part of the data field in the frame being transmitted from the fraudulent ECU to be overwritten with the error frame (a bit sequence of the prioritized dominant value) on the bus 500a.
The gateway 300 which has received the error frame transmitted in sequence S1007 aborts reception of the frame being transmitted from the fraudulent ECU during the reception of the data field (sequence S1008). That is, the data field from the fraudulent ECU has been overwritten with the error frame, and the gateway 300 detects the error frame and thus does not continue the reception of the frame being transmitted from the fraudulent ECU.
The fraud-sensing ECU 100a increments the fraud-sensing counter corresponding to the message ID “4” of the data frame for which the error frame has been transmitted (sequence S1009).
If the fraud-sensing counter corresponding to the message ID “4” becomes greater than or equal to 17 as a result of the increment, the fraud-sensing ECU 100a transmits a frame indicating error display (error display message) so that the frame can be received by the head unit 200 (sequence S1010). Consequently, the frame processing unit 220 of the head unit 200 performs a process for providing error display, and an error notification is issued via an LCD or the like. The error notification may be issued via, in place of display on an LCD or the like, audio output, light emission, or the like.
A fraud-sensing ECU illustrated in the first embodiment determines whether a transmitted frame (data frame) is a fraudulent frame or not by using an authorized-ID list in terms of the ID field of the frame. This enables the occurrence of a fraud to be determined based on the ID field in the data frame, and can thus prevent existing nodes (that is, ECUs other than a fraud-sensing ECU and a fraudulent ECU) from interpreting a fraudulent frame and from performing a process corresponding to the frame. In addition, it is only required to receive the data frame up to the ID field subsequent to the SOF at the beginning of the data frame to perform determination, thereby making it possible to reduce bus traffic, compared to the case where determination is performed after the receipt of the latter part or the like of the data frame.
In addition, the fraud-sensing ECU counts the number of times an error frame has been transmitted, by using fraud-sensing counters, and can thus detect that a transmission error counter in a node that transmits a fraudulent message ID has reached an upper limit value at which the transition to the passive state is required according to the CAN protocol in response to receipt of an error frame. This makes it possible to determine whether or not a node that transmits a fraudulent message ID is compatible with the specification of an error counter in the CAN protocol.
In addition, the use of only a fraud-sensing ECU as a node for judgment of a fraudulent frame can minimize the effect on the existing network configuration, resulting in the amount of processing and the amount of power consumption being reduced in the entire system.
Note that it may be switchable whether one or more fraud-sensing ECUs in the in-vehicle network system 10 described above are to perform sensing or not. Additionally, each fraud-sensing ECU may be configured not to sense a fraudulent message inly when the vehicle is in a certain state, for example, when a certain period has elapsed since the start of the use of the vehicle. This can keep the amount of power consumption low, and can reduce consumption of an in-vehicle battery that is a power supply of the in-vehicle network system 10.
An embodiment of the present disclosure will now be described in the context of an in-vehicle network system 11 including a fraud-sensing ECU that implements an anti-fraud method for preventing a process based on a fraudulent frame from being executed on any other node (ECU) on the basis of a data range allowed for each message ID.
The fraud-sensing ECUs 2100a and 2100b are ECUs connected to the bus 500a and the bus 500b, respectively, and having a function of determining whether frames transmitted from the ECUs 400a to 400d, etc. are fraudulent or not and transmitting an error frame if the frames are fraudulent.
The frame interpretation unit 2150 is obtained by modifying the frame interpretation unit 150 illustrated in the first embodiment, and is configured to receive values of a frame from the frame transceiving unit 160 and to interpret and map the values into the respective fields in the frame formats specified in the CAN protocol. The frame interpretation unit 2150 transfers a value (data) judged to correspond to the data field when the frame is judged to be a data frame, together with the ID (message ID) in the ID field, to the fraudulent frame sensing unit 2130. Further, the frame interpretation unit 2150 notifies the frame generation unit 140 that the frame generation unit 140 is requested to transmit an error frame if the frame is judged not to comply with the CAN protocol. Further, when an error frame is received, that is, when an error frame is interpreted to have started from a value in the received frame, the frame interpretation unit 2150 discards the subsequent part of the frame, that is, aborts interpretation of the frame.
The fraudulent frame sensing unit 2130 is obtained by modifying the fraudulent frame sensing unit 130 illustrated in the first embodiment, and is configured to receive the message ID and the value in the data field (data) sent from the frame interpretation unit 2150 and to determine whether or not these values meet a predetermined condition indicating a fraud. That is, the fraudulent frame sensing unit 2130 functions as a so-called determination unit that determines whether or not the content of a predetermined field in a received frame meets a predetermined condition indicating a fraud. The predetermined condition indicating a fraud is a condition in which the data is not within a data range listed in a data range list held in the data range list holding unit 2120 in association with the message ID. The fraudulent frame sensing unit 2130 determines whether or not a fraud has occurred, in accordance with a data range list held in the data range list holding unit 2120, which is a list defining data ranges for individual message IDs. If data in a range which is not defined in the data range list is received, the fraudulent frame sensing unit 2130 notifies the fraud-sensing counter holding unit 110 of the received message ID in order to increment the number of times a fraud has been sensed. The control performed to, when the number of times a fraud has been sensed reaches a certain number or more, transmit an error display message so that the error display message can be received by the head unit 200 has been described in the first embodiment, and is not described here. If data in a range which is not defined in the data range list is received, the fraudulent frame sensing unit 2130 notifies the frame generation unit 140 that the frame generation unit 140 is requested to transmit an error frame.
The data range list holding unit 2120 holds a data range list that is a list defining in advance ranges allowed for data (the values in the data fields) included in data frames transmitted on a bus in the in-vehicle network system 11 (see
A description will now be given of the operation of the fraud-sensing ECU 2100a, the ECU 400a, the ECU 400b, the gateway 300, and so forth connected to the bus 500a in the in-vehicle network system 11 having the configuration described above in a case where a fraudulent ECU is connected to the bus 500a.
First, a fraudulent ECU starts to transmit a fraudulent data frame (sequence S1001). Each of the fraud-sensing ECU 2100a, the ECU 400a, the ECU 400b, and the gateway 300 receives a message ID (sequence S1002). Each of the ECU 400a, the ECU 400b, and the gateway 300 checks the message ID by using the reception-ID list held therein (sequence S1003). The ECU 400a and the ECU 400b terminate reception since the respectively held reception-ID lists do not include “4” (see
Subsequently to sequence S1006a, the fraud-sensing ECU 2100a checks the data in the data field by using the data range list (see
While the fraud-sensing ECU 2100a is preparing the issuance of an error frame, the CRC field (the CRC sequence and the CRC delimiter), which is a part subsequent to the data field, is sequentially delivered bit-by-bit to the bus 500a from the fraudulent ECU. The gateway 300 starts the reception of the CRC field (sequence S2002).
Then, the preparation of the issuance of an error frame is completed, and the fraud-sensing ECU 2100a transmits an error frame (sequence S1007). The transmission of the error frame is started, thus allowing the middle part of the CRC sequence in the frame being transmitted from the fraudulent ECU to be overwritten with the error frame (a bit sequence of the prioritized dominant value) on the bus 500a.
The gateway 300 which has received the error frame transmitted in sequence S1007 aborts reception of the data frame being transmitted from the fraudulent ECU during the reception of the CRC field including the CRC sequence (sequence S2003). That is, the CRC sequence from the fraudulent ECU has been overwritten with the error frame, and the gateway 300 detects the error frame and thus does not continue the reception of the data frame being transmitted from the fraudulent ECU.
The fraud-sensing ECU 2100a increments the fraud-sensing counter corresponding to the ID “4” of the data frame for which the error frame has been transmitted (sequence S1009). If the fraud-sensing counter corresponding to the ID “4” becomes greater than or equal to 17 as a result of the increment, the fraud-sensing ECU 2100a transmits an error display message (sequence S1010).
A fraud-sensing ECU illustrated in the second embodiment determines whether a transmitted frame is a fraudulent frame or not by using a data range list in terms of the ID field and the data field in the frame (data frame). This enables the occurrence of a fraud to be determined based on a combination of the ID field and the data field in a data frame, and can thus prevent existing ECUs (that is, ECUs other than a fraud-sensing ECU and a fraudulent ECU) from interpreting a fraudulent frame and from performing a process corresponding to the frame. In addition, it is only required to receive the data frame up to the data field to perform determination, thereby making it possible to reduce bus traffic, compared to the case where determination is performed after the receipt of the latter part of the data frame.
In addition, the fraud-sensing ECU counts the number of times an error frame has been transmitted, by using fraud-sensing counters, and can thus detect that a transmission error counter in a node that transmits a fraudulent message ID has reached an upper limit value at which the transition to the passive state is required according to the CAN protocol in response to receipt of an error frame. This makes it possible to determine whether or not a node that transmits a fraudulent message ID is compatible with the specification of an error counter in the CAN protocol.
In addition, the use of only a fraud-sensing ECU as a node for judgment of a fraudulent frame can minimize the effect on the existing network configuration, resulting in the amount of processing and the amount of power consumption being reduced in the entire system.
Note that it may be switchable whether one or more fraud-sensing ECUs in the in-vehicle network system 11 described above are to perform sensing or not. Additionally, each fraud-sensing ECU may be configured not to sense a fraudulent message inly when the vehicle is in a certain state, for example, when a certain period has elapsed since the start of the use of the vehicle. This can keep the amount of power consumption low.
An embodiment of the present disclosure will now be described in the context of an in-vehicle network system 12 including a fraud-sensing ECU that implements an anti-fraud method for preventing a process based on a fraudulent frame from being executed on any other node (ECU) by using a message authentication code (MAC) calculated based on a message ID, data, and a counter value.
The fraud-sensing ECUs 3100a and 3100b are ECUs connected to the bus 500a and the bus 500b, respectively, and having a function of determining whether frames transmitted from the ECUs 3400a to 3400d, etc. are fraudulent or not and transmitting an error frame if the frames are fraudulent.
The ECUs 3400a to 3400d are each connected to any bus, and are connected to the engine 401, the brakes 402, the door open/close sensor 403, and the window open/close sensor 404, respectively. Each of the ECUs 3400a to 3400d obtains the state of the device connected thereto (such as the engine 401), and periodically transmits a data frame indicating the state to a network (that is, the bus). The data frame to be transmitted has a data field which is assigned a message authentication code (MAC) derived from a message ID, a data value, and a counter value incremented for each transmission through computation.
The frame generation unit 3420 is obtained by partially modifying the frame generation unit 420 illustrated in the first embodiment. In accordance with a notification of instructions to transmit an error frame, which is sent from the frame interpretation unit 450, the frame generation unit 3420 forms an error frame and notifies the frame transceiving unit 460 of the error frame for transmission. Further, the frame generation unit 3420 notifies the MAC generation unit 3410 of the value of the data sent from the data obtaining unit 470 and a predetermined message ID, and receives a calculated MAC. The frame generation unit 3420 forms a frame in such a manner that the frame includes the predetermined message ID, the value of the data sent from the data obtaining unit 470, and the MAC received from the MAC generation unit 3410 (see
The MAC generation unit 3410 calculates (derives through computation) a MAC by using a MAC key held in the MAC key holding unit 3430 for a value (composite value) obtained by combining the message ID and the value of the data sent from the frame generation unit 3420 with a counter value held in the counter holding unit 3440, and notifies the frame generation unit 3420 of the MAC obtained as a result of the calculation. Here, HMAC (Hash-based Message Authentication Code) (see RFC 2104 HMAC: Keyed-Hashing for Message Authentication) is adopted as a MAC computation method, and the first 4 bytes of a value obtained as a result of the computation with a value obtained by padding the composite value described above to a predetermined block (for example, 4 bytes) using a MAC key are regarded as a MAC. While the composite value used for calculating a MAC uses here a message ID, the value of data, and a counter value held in the counter holding unit 3440, any one or a combination of two of these three values may be used to calculate a MAC.
The MAC key holding unit 3430 holds a MAC key necessary for computing a MAC.
The counter holding unit 3440 holds a counter value necessary for computing a MAC. The counter value is incremented each time a data frame is properly transmitted from the frame transceiving unit 460.
The ECUs 3400b to 3400d are obtained by partially modifying the ECUs 400b to 400d illustrated in the first embodiment, respectively, and each have a configuration basically similar to that of the ECU 3400a described above. However, the reception-ID list held in the reception-ID list holding unit 440 may have content different from one ECU to another. For example, the ECU 3400a and the ECU 3400b hold the reception-ID list illustrated by way of example in
The frame interpretation unit 3150 is obtained by modifying the frame interpretation unit 150 illustrated in the first embodiment, and is configured to receive values of a frame from the frame transceiving unit 160 and to interpret and map the values into the respective fields in the frame formats specified in the CAN protocol. The frame interpretation unit 3150 transfers a value (data) judged to correspond to the data field when the frame is judged to be a data frame, together with the ID (message ID) in the ID field, to the fraudulent MAC sensing unit 3130. Further, the frame interpretation unit 3150 notifies the frame generation unit 140 that the frame generation unit 140 is requested to transmit an error frame if the frame is judged not to comply with the CAN protocol. Further, when an error frame is received, that is, when an error frame is interpreted to have started from a value in the received frame, the frame interpretation unit 3150 discards the subsequent part of the frame, that is, aborts interpretation of the frame.
The fraudulent MAC sensing unit 3130 has a function of receiving the message ID and the value in the data field (data) sent from the frame interpretation unit 3150 and verifying the MAC in the data field. The fraudulent MAC sensing unit 3130 notifies the MAC generation unit 3170 of the message ID and the value in the data field, which have been sent, and obtains a MAC generated by the MAC generation unit 3170. The fraudulent MAC sensing unit 3130 determines whether or not the data in the data field meets a predetermined condition indicating a fraud. That is, the fraudulent MAC sensing unit 3130 functions as a so-called determination unit that determines whether or not the content of a predetermined field in a received frame meets a predetermined condition indicating a fraud. The predetermined condition indicating a fraud is failure of verification in a preset verification process procedure (a procedure including the generation of a MAC, the comparison of MACs, and so forth), that is, a condition in which the MAC included in the data does not match the MAC generated by the MAC generation unit 3170. The fraudulent MAC sensing unit 3130 compares the MAC obtained from the MAC generation unit 3170 with the MAC in the data field to determine whether or not a fraud has occurred (that is, verify the MAC). If a match is not found as a result of the comparison between the values of the two MACs, the fraudulent MAC sensing unit 3130 notifies the fraud-sensing counter holding unit 110 of the received message ID in order to increment the number of times a fraud has been sensed. The control performed to, when the number of times a fraud has been sensed reaches a certain number or more, transmit an error display message so that the error display message can be received by the head unit 200 has been described in the first embodiment, and is not described here. If a match is not found as a result of the comparison between the values of the two MACs, furthermore, the fraudulent MAC sensing unit 3130 notifies the frame generation unit 140 that the frame generation unit 140 is requested to transmit an error frame. If a match is found as a result of the comparison between the MAC values, the fraudulent MAC sensing unit 3130 notifies the MAC generation unit 3170 that the MAC generation unit 3170 is requested to increment the counter value corresponding to the message ID, which is held in the counter holding unit 3190.
The MAC generation unit 3170 obtains the corresponding MAC key from the MAC key holding unit 3180 by using the message ID sent from the fraudulent MAC sensing unit 3130, and obtains the corresponding counter from the counter holding unit 3190. The MAC generation unit 3170 calculates (derives through computation) a MAC by using the MAC key obtained from the MAC key holding unit 3180 for the value in the data field (the value in the first 1 byte) sent from the fraudulent MAC sensing unit 3130 and the counter value obtained from the counter holding unit 3190, and notifies the fraudulent MAC sensing unit 3130 of the calculated MAC. The fraud-sensing ECUs 3100a and 3100b and the ECUs 3400a to 3400d use the same algorithm to calculate a MAC by using a MAC key.
The MAC key holding unit 3180 holds a MAC key necessary for computing a MAC in association with each message ID. The MAC keys held in the MAC key holding unit 3180 have different values for the respective message IDs associated therewith. If it is assumed that a single transmitting node transmits frames each corresponding to one of a plurality of message IDs, MAC keys used for ECUs and fraud-sensing ECUs may be keys different for each transmitting node. The MAC keys may also be configured such that, for example, the same value is used for frames to be transmitted on the same bus, the same key (value) is used even on different buses, the same key is used per vehicle, the same key is used for the same type of vehicle, the same key is used for each same producer, or the same key is used for different producers.
The counter holding unit 3190 holds, for each message ID, a counter value necessary for computing a MAC value. The counter value is incremented when a frame is properly received (that is, when the MACs match as a result of comparison by the fraudulent MAC sensing unit 3130).
A description will now be given of the operation of the fraud-sensing ECU 3100a, the ECU 3400a, the ECU 3400b, the gateway 300, and so forth connected to the bus 500a in the in-vehicle network system 12 having the configuration described above in a case where a fraudulent ECU is connected to the bus 500a.
First, a fraudulent ECU starts to transmit the fraudulent data frame described above (sequence S1001a). Each of the fraud-sensing ECU 3100a, the ECU 3400a, the ECU 3400b, and the gateway 300 receives a message ID (sequence S1002). Each of the ECU 3400a, the ECU 3400b, and the gateway 300 checks the message ID by using the reception-ID list held therein (sequence S1003). The ECU 3400a and the ECU 3400b terminate reception since the respectively held reception-ID lists do not include “4” (see
Subsequently to sequence S1006a, the fraud-sensing ECU 3100a verifies (checks) the MAC included in the data in the data field (sequence S3001). That is, the fraud-sensing ECU 3100a determines whether or not the content of the ID field in the transmitted frame meets a predetermined condition (failure of verification of the MAC) indicating a fraud. The fraud-sensing ECU 3100a verifies the MAC by comparing the MAC, which is the last 4 bytes for the 6-byte data “0xFF FF FF FF FF FF” in the data field in the data frame transmitted from the fraudulent ECU, with a MAC determined by using the MAC key and the counter corresponding to the message ID “4”. Here, a match is not found as a result of the comparison and verification fails. Thus, the fraud-sensing ECU 3100a judges that the data frame is fraudulent, and then starts to prepare the issuance of an error frame (sequence S1005).
While the fraud-sensing ECU 3100a is preparing the issuance of an error frame, the gateway 300 starts the reception of the CRC field (sequence S2002).
Then, the preparation of the issuance of an error frame is completed, and the fraud-sensing ECU 3100a transmits an error frame (sequence S1007). The transmission of the error frame is started, thus allowing the middle part of the CRC sequence in the frame being transmitted from the fraudulent ECU to be overwritten with the error frame on the bus 500a.
The gateway 300 which has received the error frame transmitted in sequence S1007 aborts reception of the data frame being transmitted from the fraudulent ECU during the reception of the CRC field including the CRC sequence (sequence S2003).
The fraud-sensing ECU 3100a increments the fraud-sensing counter corresponding to the ID “4” of the data frame for which the error frame has been transmitted (sequence S1009). If the fraud-sensing counter corresponding to the ID “4” becomes greater than or equal to 17 as a result of the increment, the fraud-sensing ECU 3100a transmits an error display message (sequence S1010).
A fraud-sensing ECU illustrated in the third embodiment determines whether a transmitted frame is a fraudulent frame or not by verifying a MAC included in a data field of a frame (data frame). This can prevent existing ECUs (that is, ECUs other than a fraud-sensing ECU and a fraudulent ECU) from interpreting a fraudulent frame and from performing a process corresponding to the frame. In addition, it is only required to receive the data frame up to the data field to perform determination, thereby making it possible to reduce bus traffic, compared to the case where determination is performed after the receipt of the latter part of the data frame.
In addition, the fraud-sensing ECU counts the number of times an error frame has been transmitted, by using fraud-sensing counters, and can thus detect that a transmission error counter in a node that transmits a fraudulent message ID has reached an upper limit value at which the transition to the passive state is required according to the CAN protocol in response to receipt of an error frame. This makes it possible to determine whether or not a node that transmits a fraudulent message ID is compatible with the specification of an error counter in the CAN protocol.
In addition, the use of only a fraud-sensing ECU as a node for the verification of a MAC can eliminate the need for an ECU other than the fraud-sensing ECU to perform verification, resulting in the amount of processing and the amount of power consumption being reduced in the entire system.
Note that it may be switchable whether one or more fraud-sensing ECUs in the in-vehicle network system 12 described above are to perform sensing or not. Additionally, each fraud-sensing ECU may be configured not to sense a fraudulent message inly when the vehicle is in a certain state, for example, when a certain period has elapsed since the start of the use of the vehicle. This can keep the amount of power consumption low.
An embodiment of the present disclosure will now be described in the context of an in-vehicle network system 13 that implements a fraud sensing method for switching the operation mode of a fraud-sensing ECU as to whether or not to perform a specific sensing process for sensing a fraudulent message (frame) in accordance with the state of the vehicle.
The fraud-sensing ECUs 4100a and 4100b are ECUs connected to the bus 500a and the bus 500b, respectively, and having a function of determining whether frames (messages) transmitted from the ECUs 400a to 400d, etc. are fraudulent or not and transmitting an error frame if the frames are fraudulent. The fraud-sensing ECUs 4100a and 4100b are obtained by partially modifying the fraud-sensing ECUs 100a and 100b illustrated in the first embodiment, respectively. The fraud-sensing ECUs 4100a and 4100b have, as operation modes, a check mode (sensing mode) in which it is determined whether frames (messages) transmitted from the ECUs 400a to 400d are fraudulent or not, and a standby mode in which it is not determined whether frames (message) transmitted from the ECUs 400a to 400d are fraudulent or not. Further, the fraud-sensing ECUs 4100a and 4100b have a function of switching the operation mode in response to instructions (trigger frame) from the head unit 4200. The trigger frame is a switching instruction message that triggers switching of the operation mode. When the operation mode is switched to the standby mode, a certain process related to the sensing of a fraudulent message is not performed, making effects, such as a reduced amount of processing and reduced power consumption, more feasible than in the check mode.
The head unit 4200 has a function of transmitting and receiving a frame, and a function of receiving frames transmitted from the ECUs 400a to 400d and displaying various states on a display (not illustrated) to present the states to a user. The head unit 4200 is obtained by partially modifying the head unit 200 illustrated in the first embodiment. The head unit 4200 has a function of determining whether, for example, frames transmitted from the ECUs 400a to 400d are fraudulent or not and instructing the fraud-sensing ECUs 4100a and 4100b to switch to the check mode if a fraudulent frame is transmitted. That is, the head unit 4200 has a function of, when the state of the vehicle satisfies a certain condition, transmitting a trigger frame to the fraud-sensing ECUs 4100a and 4100b to give instructions to change the operation mode. The certain condition is a condition for determining the possibility of occurrence of an event that influences the need for a fraud-sensing ECU to sense a fraudulent message. Examples of the certain condition for switching the operation mode to the check mode include a case where the transmission of a fraudulent message is sensed in an in-vehicle network system installed in a vehicle, a case where the use of the vehicle is started, and a case where communication with a device outside the vehicle is ready to be started. Examples of the certain condition for switching the operation mode to the standby mode include one or a combination of a case where no fraudulent message is sensed within a certain period, a case where a certain period of time has elapsed since a vehicle started to be used, and a case where a certain state has been entered after the communication with a device outside the vehicle has been completed.
In this embodiment, it is assumed that the gateway 300 transfers a trigger frame between the buses 500a to 500c.
The frame interpretation unit 4260 is obtained by partially modifying the frame interpretation unit 260 illustrated in the first embodiment. The frame interpretation unit 4260 receives values of a frame from the frame transceiving unit 270, and interprets and maps the values into the respective fields in the frame formats specified in the CAN protocol. The frame interpretation unit 4260 transfers a value judged to correspond to the ID field to the reception-ID judgment unit 240. In accordance with a determination result sent from the reception-ID judgment unit 240, the frame interpretation unit 4260 determines whether to transfer the value in the ID field and the data field that appears after the ID field to the frame processing unit 220 and the fraudulent frame detection unit 4280 or to abort reception of the frame (that is, abort interpretation of the frame) after the determination result has been received. Further, the frame interpretation unit 4260 notifies the frame generation unit 4230 that the frame generation unit 4230 is requested to transmit an error frame if the frame is judged not to comply with the CAN protocol. Further, when an error frame is received, that is, when an error frame is interpreted to have started from a value in the received frame, the frame interpretation unit 4260 discards the subsequent part of the frame, that is, aborts interpretation of the frame. For example, in a case where an error frame is interpreted to have started in the middle of the data frame, the interpretation of the data frame is aborted and a particular process is not performed according to the data frame.
The frame transceiving unit 270 transmits and receives a frame compliant with the CAN protocol to and from the bus 500c. The frame transceiving unit 270 receives a frame from the bus 500c bit-by-bit, and transfers the frame to the frame interpretation unit 4260. Further, the frame transceiving unit 270 transmits the content of a frame of which the frame transceiving unit 270 has been notified by the frame generation unit 4230 to the bus 500c bit-by-bit.
The reception-ID judgment unit 240 receives the value in the ID field sent from the frame interpretation unit 4260, and determines whether or not to receive the respective fields of the frame after the ID field, in accordance with a list of message IDs held in the reception-ID list holding unit 250. The reception-ID judgment unit 240 notifies the frame interpretation unit 4260 of the determination result.
Similarly to the frame generation unit 230 in the first embodiment, in accordance with a notification of instructions from the frame interpretation unit 4260 to transmit an error frame, the frame generation unit 4230 forms an error frame and notifies the frame transceiving unit 270 of the error frame for transmission. In addition, in accordance with a request from the mode change instruction unit 4281 to transmit a trigger frame, the frame generation unit 4230 forms a trigger frame and notifies the frame transceiving unit 270 of the trigger frame for transmission.
The fraudulent frame detection unit 4280 receives the value in the ID field and the value in the data field sent from the frame interpretation unit 4260, and detects a fraudulent frame when the fraudulent frame is transmitted on the bus 500c. Upon detecting a fraudulent frame, the fraudulent frame detection unit 4280 requests the mode change instruction unit 4281 to notify the fraud-sensing ECUs 4100a and 4100b of instructions to transition to the check mode. If no fraudulent frame is detected within a certain period after the request for a notification of instructions to transition to the check mode, the fraudulent frame detection unit 4280 may request the mode change instruction unit 4281 to notify the fraud-sensing ECUs 4100a and 4100b of instructions to transition to the standby mode. The method by which the fraudulent frame detection unit 4280 detects a fraudulent frame is the same as the method of the fraudulent frame sensing unit 130 in the first embodiment, for example. Alternatively, for example, the method by which the fraudulent frame detection unit 4280 detects a fraudulent frame may be the same as the method of the fraudulent frame sensing unit 2130 in the second embodiment or the method of the fraudulent MAC sensing unit 3130 in the third embodiment, or may be any other method.
The mode change instruction unit 4281 has a function of requesting the frame generation unit 4230 to transmit a trigger frame to the fraud-sensing ECUs 4100a and 4100b to instruct the fraud-sensing ECUs 4100a and 4100b to change their operation mode. When the state of the vehicle satisfies a certain condition, the mode change instruction unit 4281 requests the frame generation unit 4230 to transmit a trigger frame, in response to a request from the fraudulent frame detection unit 4280, the vehicle-use start detection unit 4282, or the communication start/end detection unit 4283. The trigger frame is a switching instruction message that triggers switching the operation mode of a fraud-sensing ECU. Trigger frames include a trigger frame for providing instructions to transition from the standby mode to the check mode, and a trigger frame for providing instructions to transition from the check mode to the standby mode, and both are identified by, for example, a message ID in the ID field, an identifier provided in the data field, or the like. When a trigger frame is transmitted, the gateway 300 transfers the trigger frame between buses and each fraud-sensing ECU receives the trigger frame.
The vehicle-use start detection unit 4282 detects the start of the use of the vehicle, and requests the mode change instruction unit 4281 to notify the fraud-sensing ECUs 4100a and 4100b of instructions to transition to the check mode. The vehicle-use start detection unit 4282 achieves the detection of the start of the use of the vehicle by, for example, sensing the release of door lock, the opening of a door, the activation of the engine, or the like by using a message or the like from each ECU. Consequently, for example, if a fraudulent ECU is installed in a vehicle parked in a parking space, thereafter, when the vehicle starts to be used, the fraud-sensing ECUs 4100a and 4100b are brought into the check mode so that the fraudulent ECU can be detected. Even before the start of the use of the vehicle, the in-vehicle network system can be put into operation if power is supplied from the battery or the like. Further, the vehicle-use start detection unit 4282 detects the passage of a certain period of time after the start of the use of the vehicle has been detected, and requests the mode change instruction unit 4281 to notify the fraud-sensing ECUs 4100a and 4100b of instructions to transition to the standby mode. The certain period of time is a period of time (for example, several minutes) longer than expected to be required for a fraudulent ECU to transmit a fraudulent message after the start of the use of the vehicle if the fraudulent ECU has been connected to a bus in the in-vehicle network system before the start of the use of the vehicle.
The communication start/end detection unit 4283 detects that the head unit 4200 has started communicating with the outside, and requests the mode change instruction unit 4281 to notify the fraud-sensing ECUs 4100a and 4100b of instructions to transition to the check mode. Consequently, for example, if a fraudulent frame is fraudulently transmitted on a bus in the in-vehicle network system from the outside through communication via the head unit 4200, the fraud can be detected by the fraud-sensing ECUs 4100a and 4100b that are in the check mode. It is anticipated that communication from the outside might cause a control program for the head unit 4200 to be fraudulently rewritten and cause the fraudulent frame detection unit 4280, the mode change instruction unit 4281, etc. to malfunction. Instructing the fraud-sensing ECUs 4100a and 4100b to transition to the check mode before communication with the outside makes a fraudulent frame detectable even if the fraudulent frame detection unit 4280, the mode change instruction unit 4281, or the like is subjected to malfunction. Further, the communication start/end detection unit 4283 detects that the head unit 4200 has entered a certain state after communication with the outside has been completed, and requests the mode change instruction unit 4281 to notify the fraud-sensing ECUs 4100a and 4100b of instructions to transition to the standby mode. The certain state after communication with the outside has been completed is, for example, a state where communication with the outside has been completed. The certain state after communication with the outside has been completed may also be a state where a certain period of time has elapsed since communication with the outside was completed. This can address a situation such as the transmission of a fraudulent frame after the completion of communication with the outside in accordance with a control program which has been fraudulently rewritten through the communication with the outside. In this case, the certain period of time is a period of time (for example, several minutes) longer than expected to be required for a fraudulent message to be transmitted through the execution of a fraudulent program after communication with the outside has been completed in a case where the fraudulent program or the like is supplied from the outside through communication with the outside.
The mode change instruction unit 4281 may cooperate with the fraudulent frame detection unit 4280, the vehicle-use start detection unit 4282, and the communication start/end detection unit 4283 to request the frame generation unit 4230 to transmit a trigger frame for providing instructions to transition to the standby mode only in a situation where no fraudulent message is sensed within a certain period, a situation where a certain period of time has elapsed since the start of the use of the vehicle, and a situation where the vehicle has entered a certain state after communication with a device outside the vehicle has been completed. The mode change instruction unit 4281 may hold a predetermined rule that is a standard for judgment of what condition is to be satisfied in accordance with the state of the vehicle in order to request transmission of a trigger frame. The rule may be constituted by a single rule or plural rules. In addition, the rule may be set at the time of the shipment of the head unit 4200, at the time of the shipment of a vehicle in which the in-vehicle network system is to be installed, at the time of sale, or the like. The head unit 4200 may obtain and update the rule from the outside through communication. Alternatively, the head unit 4200 may be configured such that a recording medium that holds the rule is removably set in the head unit 4200. The rule may be based on the assumption that states such as being parked, stopped, filled, charged, and communicating with the outside are sensed as the states of the vehicle. Only a specific fraud-sensing ECU may be instructed to change the operation mode, by operation such as making the content of a trigger frame (for example, in the data field) include, for example, information identifying individual fraud-sensing ECUs. For example, a rule may be set in which it is judged that a trigger frame for instructing only the fraud-sensing ECU 4100b to transition to the check mode is transmitted when a fraudulent frame is detected while the vehicle is parked and is communicating with the outside and when a request is sent from the fraudulent frame detection unit 4280 to notify the fraud-sensing ECUs 4100a and 4100b of instructions to transition to the check mode. This is an example of a rule based on the consideration that a fraudulent frame that might influence the operation of the engine 401 or the brakes 402 will not be transmitted while the vehicle is parked or, even if a fraudulent frame is transmitted, no problem will occur so long as the vehicle is parked. In a case where a trigger frame is configured to instruct a specific fraud-sensing ECU to change the operation mode, the gateway 300 may transfer the trigger frame only to a bus necessary to transmit the trigger frame to the specific fraud-sensing ECU.
Similarly to the frame interpretation unit 150 in the first embodiment, the frame interpretation unit 4150 receives values of a frame from the frame transceiving unit 160, and interprets and maps the values into the respective fields in the frame formats specified in the CAN protocol. Further, the frame interpretation unit 4150 obtains the operation mode of the fraud-sensing ECU 4100a from the mode holding unit 4180, and judges the transfer destination of the received values of the frame in accordance with the operation mode. For example, when the fraud-sensing ECU 4100a is in the check mode, the frame interpretation unit 4150 transfers the value in the ID field to the fraudulent frame sensing unit 130 and the trigger frame detection unit 4170, and transfers the value in the data field subsequent to the ID field to the trigger frame detection unit 4170. When the fraud-sensing ECU 4100a is in the standby mode, the frame interpretation unit 4150 transfers the value in the ID field and the value in the subsequent data field to only the trigger frame detection unit 4170. This allows the fraudulent frame sensing unit 130 to sense a fraud only when the operation mode is the check mode. That is, the process related to the sensing of a fraud by the fraudulent frame sensing unit 130 is not performed when the operation mode is the standby mode.
The trigger frame detection unit 4170 judges whether or not the frame received by the fraud-sensing ECU 4100a matches the trigger frame transmitted from the head unit 4200. If the frame received by the fraud-sensing ECU 4100a is the trigger frame, the trigger frame detection unit 4170 records the check mode or the standby mode, serving as an operation mode, on the mode holding unit 4180. That is, if the received frame is a trigger frame that provides instructions to transition from the standby mode to the check mode, the trigger frame detection unit 4170 records the check mode. If the received frame is a trigger frame that provides instructions to transition from the check mode to the standby mode, the trigger frame detection unit 4170 records the standby mode.
The mode holding unit 4180 has a function of holding which of the standby mode and the check mode the operation mode of the corresponding device (the fraud-sensing ECU 4100a) is, in a storage medium such as a memory.
A description will now be given of the operation of the head unit 4200 and the fraud-sensing ECU 4100a when a fraudulent frame (message) is transmitted on the bus 500c in the in-vehicle network system 13 having the configuration described above.
At the starting stage of this example operation, the fraud-sensing ECU 4100a has entered the standby mode (sequence S4001). For example, as a result of the fraud-sensing ECU 4100a having received a trigger frame that provides instructions to transition to the standby mode prior to this stage, the fraud-sensing ECU 4100a is in the standby mode. In the fraud-sensing ECU 4100a, in this case, the fraudulent frame sensing unit 130 is not sensing a fraudulent message.
The head unit 4200 receives a frame (message) transmitted on the bus 500c (sequence S4002).
The head unit 4200 checks whether the message received by the fraudulent frame detection unit 4280 is a fraudulent message or not (sequence S4003). If the message is not a fraudulent message, the process returns to the process procedure for receiving a message (sequence S4002).
Upon detecting that the received message is a fraudulent message, the head unit 4200 judges whether or not the operation mode of the fraud-sensing ECU 4100a is already the check mode, based on the previous history of instructions given to the fraud-sensing ECU 4100a (sequence S4004). For example, a fraudulent message may be transmitted from a fraudulent ECU connected to a bus. The head unit 4200 grasps the operation modes of the individual fraud-sensing ECUs by, for example, holding a history of instructions when instructing the fraud-sensing ECU 4100a and the like to transition to the check mode or to transition to the standby mode by using a trigger frame.
If it is judged that the operation mode of the fraud-sensing ECU 4100a is not the check mode (is the standby mode), the head unit 4200 provides instructions to transition to the check mode (sequence S4005). Specifically, the head unit 4200 transmits a trigger frame that provides instructions to transition to the check mode. If it is judged in sequence S4004 that the operation mode of the fraud-sensing ECU 4100a is already the check mode, the head unit 4200 skips the process procedure of providing instructions to transition to the check mode and ends the operation.
The trigger frame that provides instructions to transition to the check mode, which is transmitted from the head unit 4200 to the bus 500c, is transferred to the buses 500a and 500b through the gateway 300.
The fraud-sensing ECU 4100a receives the trigger frame transmitted to the bus 500a and transitions the operation mode to the check mode (sequence S4006). At this time, in the fraud-sensing ECU 4100a, the fraudulent frame sensing unit 130 initiates the sensing of a fraudulent message. That is, in the check mode, the fraud-sensing ECU 4100a is ready to implement an anti-fraud method for preventing any other node (ECU) from executing a process based on a fraudulent frame. Accordingly, as illustrated in the first embodiment, even if a fraudulent message is transmitted on a bus to which the fraud-sensing ECU 4100a is connected, a process according to the fraudulent message can be prevented from being performed (see
While the description has focused here on the fraud-sensing ECU 4100a among the fraud-sensing ECUs, for example, the fraud-sensing ECU 4100b can also switch its operation mode to the check mode in response to the trigger frame transmitted in sequence S4005. In addition, the head unit 4200 may omit the judgment in sequence S4004 and provide instructions to transition to the check mode in sequence S4005. In a case where the judgment in sequence S4004 is omitted, the operation modes of the individual fraud-sensing ECUs may not necessarily be grasped and the holding of the history of instructions can be omitted. However, sequence S4004 is useful to block the flow of an unnecessary trigger frame into a bus.
Besides sequence S4003 given here, the transition to the check mode takes place, for example, when the communication start/end detection unit 4283 detects the start of communication with the outside or when the vehicle-use start detection unit 4282 detects the start of the use of the vehicle.
A description will now be given of the operation of the head unit 4200 and the fraud-sensing ECU 4100a in a case where the head unit 4200 completes communication with the outside.
At the starting stage of this example operation, the fraud-sensing ECU 4100a has entered the check mode (sequence S4101). For example, as a result of the fraud-sensing ECU 4100a having received a trigger frame that provides instructions to transition to the check mode, prior to this stage, when the head unit 4200 starts communication with the outside, the fraud-sensing ECU 4100a is in the check mode. In the fraud-sensing ECU 4100a, in this case, the fraudulent frame sensing unit 130 is ready to sense a fraudulent message.
When the communication start/end detection unit 4283 detects the completion of communication with the outside (sequence S4102), the head unit 4200 judges whether or not a certain period of time has elapsed since the start of the use of the vehicle (sequence S4103). If the certain period of time has not elapsed since the start of the use of the vehicle, a trigger frame that provides instructions to transition to the standby mode is not transmitted since the transition to the standby mode is not permitted (that is, sequences S4104 and S4105 are skipped).
If the certain period of time has elapsed since the start of the use of the vehicle, the head unit 4200 judges whether or not a fraudulent message has been detected (sequence S4104). If a fraudulent message has been detected after the transmission of a trigger frame that provides instructions to transition to the check mode, a trigger frame that provides instructions to transition to the standby mode is not transmitted since the transition to the standby mode is not permitted (that is, sequence S4105 is skipped).
If it is judged in sequence S4104 that no fraudulent message has been detected, the head unit 4200 provides instructions to transition to the standby mode (sequence S4105). Specifically, the head unit 4200 transmits a trigger frame that provides instructions to transition to the standby mode.
The trigger frame that provides instructions to transition to the standby mode, which is transmitted from the head unit 4200 to the bus 500c, is transferred to the buses 500a and 500b through the gateway 300.
The fraud-sensing ECU 4100a receives the trigger frame transmitted to the bus 500a and transitions the operation mode to the standby mode (sequence S4106). At this time, in the fraud-sensing ECU 4100a, the fraudulent frame sensing unit 130 stops sensing of a fraudulent message.
While the description has focused here on the fraud-sensing ECU 4100a among the fraud-sensing ECUs, for example, the fraud-sensing ECU 4100b can also switch its operation mode to the standby mode in response to the trigger frame transmitted in sequence S4105.
A description will now be given of the operation of the head unit 4200 and the fraud-sensing ECU 4100a in a case where a certain period of time has elapsed since the start of the use of the vehicle.
At the starting stage of this example operation, the fraud-sensing ECU 4100a has entered the check mode (sequence S4201). For example, as a result of the fraud-sensing ECU 4100a having received a trigger frame that provides instructions to transition to the check mode, prior to this stage, when the head unit 4200 detects the start of the use of the vehicle, the fraud-sensing ECU 4100a is in the check mode. In the fraud-sensing ECU 4100a, in this case, the fraudulent frame sensing unit 130 is ready to sense a fraudulent message.
When the vehicle-use start detection unit 4282 detects that a certain period of time has elapsed since the start of the use of the vehicle (sequence S4202), the head unit 4200 judges whether or not communication with the outside is in progress (sequence S4203). If communication with the outside is in progress, a trigger frame that provides instructions to transition to the standby mode is not transmitted since the transition to the standby mode is not permitted (that is, sequences S4204 and S4205 are skipped).
If communication with the outside is not in progress, the head unit 4200 judges whether or not a fraudulent message has been detected (sequence S4204). If a fraudulent message has been detected after the transmission of a trigger frame that provides instructions to transition to the check mode, a trigger frame that provides instructions to transition to the standby mode is not transmitted since the transition to the standby mode is not permitted (that is, sequence S4205 is skipped).
If it is judged in sequence S4204 that no fraudulent message has been detected, the head unit 4200 provides instructions to transition to the standby mode (sequence S4205). Specifically, the head unit 4200 transmits a trigger frame that provides instructions to transition to the standby mode.
The trigger frame that provides instructions to transition to the standby mode, which is transmitted from the head unit 4200 to the bus 500c, is transferred to the buses 500a and 500b through the gateway 300.
The fraud-sensing ECU 4100a receives the trigger frame transmitted to the bus 500a and transitions the operation mode to the standby mode (sequence S4206). At this time, in the fraud-sensing ECU 4100a, the fraudulent frame sensing unit 130 stops sensing of a fraudulent message.
While the description has focused here on the fraud-sensing ECU 4100a among the fraud-sensing ECUs, for example, the fraud-sensing ECU 4100b can also switch its operation mode to the standby mode in response to the trigger frame transmitted in sequence S4205.
In the in-vehicle network system 13, the fraud-sensing ECUs 4100a and 4100b switch their operation mode between a check mode in which a fraudulent message is sensed and a standby mode in which no fraudulent message is sensed, in accordance with the state of the vehicle. This allows the sensing of a fraudulent message to be performed only when necessary in accordance with the state of the vehicle, enabling a reduction in the amount of power consumption. In addition, the fraud-sensing ECUs 4100a and 4100b can obtain the timing for switching the operation mode in accordance with a trigger frame from the head unit 4200, without using a mechanism for directly sensing the state of the vehicle.
As described above, the first to fourth embodiments have been described as illustrative examples of the technique according to the present disclosure. However, the technique according to the present disclosure is not limited to these embodiments and is also applicable to embodiments in which modifications, replacements, additions, omissions, and others are made as desired. For example, the following modifications are also included in embodiments of the present disclosure.
(1) While the embodiments described above provide an example in which frames are periodically transmitted from the ECUs 400a to 400d or the ECUs 3400a to 3400d, each frame may be transmitted as an event that provides notification of a state change. For example, each ECU may transmit a frame only when the open or closed state for the door is changed, rather than periodically transmitting the open or closed state for the door. Alternatively, each ECU may periodically transmit a frame and also transmit a frame when a state change occurs.
(2) While the third embodiment provides an example in which a MAC is calculated based on a data value and a counter value, a MAC may be calculated based on only a data value. Alternatively, a MAC may be calculated based on only a counter value. Furthermore, the size of the MAC included in a frame is not limited to 4 bytes and may be different from one transmission to another. Likewise, the size of the data value, such as the average speed per hour, and the size of the counter value are also not limited to 1 byte. In addition, each frame may not necessarily include a counter value.
(3) While the third embodiment provides an example in which a counter value is incremented for each transmission, the counter value may be a value that is incremented automatically with time. Alternatively, the value of the point in time itself may be used instead of that of a counter. That is, generation of a MAC based on a variable changing each time a data frame is transmitted (such as a counter or a point in time) can make fraudulent interpretation of the MAC difficult. In the third embodiment, furthermore, the MAC generation unit 3170 in a fraud-sensing ECU calculates a MAC value by using a message ID, the first 1 byte in the data field, and a counter value in the counter holding unit 3190. Instead of this, a MAC value may be calculated by using a message ID, the first 1 byte in the data field, and a counter value that is the following 1 byte in the data field. In addition, a counter value in the counter holding unit 3190 may be updated so as to match the counter value in a data field determined not to be fraudulent.
(4) In the embodiments described above, a data frame in the CAN protocol is configured in the standard ID format. The data frame may be in an extended ID format. In the extended ID format, an ID (message ID) is expressed in 29 bits in which the base ID at the ID position in the standard ID format and an ID extension are combined. This 29-bit ID may be handled as an ID (message ID) in the embodiments described above.
(5) In the embodiments described above, HMAC is used as a MAC calculation algorithm. Alternatively, CBC-MAC (Cipher Block Chaining Message Authentication Code) or CMAC (Cipher-based MAC) may be used. In addition, padding used in MAC computation may be any type of padding in which the data size of a block is necessary for computation, such as zero padding or that in ISO10126, PKCS #1, PKCS #5, or PKCS #7. Furthermore, also in the method of changing the size to that of a block such as 4 bytes, padding may be provided either at the beginning, end, or in the middle. Furthermore, data used for MAC calculation may not necessarily be data that is consecutive (for example, continuous data of 4 bytes), but may be a composite one configured through bit-by-bit collection in accordance with a specific rule.
(6) The CAN protocol illustrated in the embodiments described above may have a broad meaning including its derivative protocols, such as TTCAN (Time-Triggered CAN) and CAN FD (CAN with Flexible Data Rate).
(7) While the embodiments described above provide an example in which a fraudulent ECU is connected to a bus, existing ECUs such as the ECUs 400a to 400d or the ECUs 3400a to 3400d may act as fraudulent ECUs for some reason. Even in this case, as illustrated in the embodiments described above, a fraud-sensing ECU appropriately senses a fraudulent frame and transmits an error frame, and can thus prevent any other ECU from processing the fraudulent frame.
(8) In the second embodiment, a data range list in which message IDs and allowed data ranges are associated with each other is used for determination of whether or not a fraud has occurred based on whether or not data of a received data frame is included in a data range allowed for each message ID. Alternatively, a data range (for example, “0 to 180”) allowed in common for any message ID may be defined without any message ID being included in the data range list, and determination of whether or not a fraud has occurred may be performed regardless of the message ID. In addition, a data range list held in a fraud-sensing ECU may be configured such that message IDs that may be transmitted on a bus to which the fraud-sensing ECU is connected are associated with data ranges. Accordingly, the data range list can also be used as the authorized-ID list illustrated in the first embodiment. Using this, a fraud-sensing ECU illustrated in the second embodiment may also check (sequence S1004) a message ID illustrated in the first embodiment.
(9) Instead of a data range list illustrated in the second embodiment in which message IDs and allowed data ranges are associated with each other, a data length list in which message IDs and allowed data lengths are associated may be used by a fraud-sensing ECU. In this case, the fraud-sensing ECU determines whether or not the value of the control field in a received data frame meets a predetermined condition indicating a fraud. The predetermined condition indicating a fraud is a condition in which the data length (DLC) in the control field is not a data length associated with a message ID in the data length list. The fraud-sensing ECU determines whether or not a fraud has occurred based on whether or not the received DCL is a data length allowed for each message ID in the data length list.
(10) While the embodiments described above focus in particular on a data frame, it is also possible for a fraud-sensing ECU to sense a certain fraud in a remote frame. For example, the fraud-sensing ECU may determine whether the message ID in a received remote frame is fraudulent or not by using the authorized-ID list illustrated in the first embodiment. Alternatively, the fraud-sensing ECU may determine whether or not a fraud has occurred on the basis of whether or not the data length (DLC) in the control field in a received remote frame is a data length allowed for each message ID by using the data length list described above. In addition, an error frame transmitted when a fraud-sensing ECU illustrated in the embodiments described above senses a fraud upon receiving a fraudulent frame is desirably transmitted rapidly after the sensing of the fraud. It is useful that a fraud-sensing ECU transmit an error frame, after the sensing of a fraud, before the end of the CRC sequence in the fraudulent frame is transmitted. Accordingly, any other ECU detects an error frame or detects an error by checking a CRC, and aborts processing of the fraudulent frame. Similarly to the data frame, the remote frame also includes a message ID, a control field, and a CRC sequence.
(11) In the embodiments described above, a fraud-sensing ECU transmits an error display message under a certain condition. Alternatively, no error display message may be transmitted. In this case, ECUs such as a gateway and a head unit do not need to hold a configuration (such as a reception-ID list for receiving an error display message) corresponding to that of a fraud-sensing ECU, in particular. A fraud-sensing ECU may provide an error notification instead of transmitting an error display message in a case where the fraud-sensing ECU includes a speaker, a display, or the like, or may record a log of an error on a storage medium or the like.
(12) The in-vehicle network system 13 illustrated in the fourth embodiment may include both a fraud-sensing ECU capable of switching an operation mode and a fraud-sensing ECU configured not to switch an operation mode (that is, a fraud-sensing ECU similar to that which is always in the check mode). In addition, besides a function of sensing a fraudulent message transmitted on a bus, similarly to any other ECU, a fraud-sensing ECU may have a function of performing a predetermined process in accordance with a message that is not fraudulent or a function of performing a process such as sensing the state of the vehicle or controlling the vehicle. When the operation mode is a standby mode in which specific fraud sensing is not performed, the effects such as reduced processing load on a fraud-sensing ECU and reduced traffic on a bus, as well as reduced power consumption, can also be achieved.
(13) In the fourth embodiment, the head unit 4200 has a function of transmitting a trigger frame when the state of the vehicle satisfies a certain condition. Alternatively, any other ECU may have this function. The function of transmitting a trigger frame when the state of the vehicle satisfies a certain state may be included in a single ECU or a plurality of ECUs (either all the ECUs or some ECUs) in the in-vehicle network system 13. That is, the fraudulent frame detection unit 4280, the mode change instruction unit 4281, the vehicle-use start detection unit 4282, and the communication start/end detection unit 4283 of the head unit 4200 illustrated in the fourth embodiment may be included in any other ECU (such as the ECU 400a).
(14) The judgment of whether or not to provide instructions to transition to the standby mode (see
(15) While the fraud-sensing ECU 4100a illustrated in the fourth embodiment includes the function of the fraud-sensing ECU 100a in the first embodiment, a specific implementation of an anti-fraud method performed by a fraud-sensing ECU may be that illustrated in Embodiments 2 and 3. That is, the respective fraud-sensing ECUs (such as the fraud-sensing ECU 4100a) in the in-vehicle network system 13 may each be implemented as, for example, a fraud-sensing ECU 5100 illustrated in
(16) The fraudulent frame sensing unit and the fraudulent MAC sensing unit illustrated in the embodiments described above may be implemented by hardware called a CAN controller or by firmware running on a processor that operates when connected to the CAN controller. In addition, the MAC key holding unit, the counter holding unit, the authorized-ID list holding unit, and the data range list holding unit may be stored in a register of hardware called a CAN controller or in firmware running on a processor that operates when connected to the CAN controller.
(17) The individual ECUs (including a gateway and a head unit) in the embodiments described above are each assumed to be a device including, for example, digital circuits such as a processor and a memory, analog circuits, a communication circuit, and so forth, but may include other hardware components such as a hard disk drive, a display, a keyboard, and a mouse. In addition, instead of a control program stored in a memory being executed by a processor to implement functions in software, the functions may be implemented by dedicated hardware (such as a digital circuit).
(18) Some or all of the constituent elements included in each device in the embodiments described above may be constituted by a single system LSI (Large Scale Integration). The system LSI is a super-multifunctional LSI manufactured by integrating a plurality of configuration units on one chip, and is specifically a computer system configured to include a microprocessor, a ROM, a RAM, and so forth. The RAM has recorded thereon a computer program. The microprocessor operates in accordance with the computer program, thereby allowing the system LSI to achieve its function. In addition, constituent units included in each device may be integrated into individual chips or into a single chip that includes some or all of the units. While the system LSI is used here, an integrated circuit may also be referred to as an IC, an LSI, a super LSI, or an ultra LSI depending on the difference in the degree of integration. In addition, a technique for forming an integrated circuit is not limited to the LSI, and may be implemented by using a dedicated circuit or a general-purpose processor. FPGA (Field Programmable Gate Array) that can be programmed after the manufacture of the LSI or a reconfigurable processor capable of reconfiguring connection or setting of circuit cells in the LSI may be used. Additionally, if a technique for forming an integrated circuit is introduced in place of the LSI along with development in semiconductor technology or other derivative technology, it is a matter of course that the technique may be used for the integration of functional blocks. One potential approach is to apply biotechnology, for example.
(19) Some or all of the constituent elements included in each of the devices described above may be constituted by an IC card removably set in each device or a stand-alone module. The IC card or the module is a computer system constituted by a microprocessor, a ROM, a RAM, and so forth. The IC card or the module may include the super-multifunctional LSI described above. The microprocessor operates in accordance with a computer program, thereby allowing the IC card or the module to achieve its function. This IC card or module may be tamper-resistant.
(20) An aspect of the present disclosure may provide a method such as the fraud sensing method or anti-fraud method described above. An aspect of the present disclosure may also provide a computer program for implementing these methods by using a computer, or a digital signal including the computer program. In an aspect of the present disclosure, furthermore, the computer program or the digital signal may be recorded on a computer-readable recording medium such as a flexible disk, a hard disk, a CD-ROM, an MO, a DVD, a DVD-ROM, a DVD-RAM, a BD (Blu-ray (registered trademark) Disc), or a semiconductor memory. An aspect of the present disclosure may also provide the digital signal recorded on such recording media. In an aspect of the present disclosure, furthermore, the computer program or the digital signal may be transmitted via a telecommunication line, a wireless or wired communication line, a network represented by the Internet, data broadcasting, or the like. A further aspect of the present disclosure may provide a computer system including a microprocessor and a memory, in which the memory has recorded thereon the computer program described above and the microprocessor operates in accordance with the computer program. Moreover, the program or the digital signal may be recorded on the recording medium and transported, or the program or the digital signal may be transported via the network or the like, so as to be performed by any other independent computer system.
(21) Embodiments achieved by any combination of constituent elements and functions illustrated in the embodiments described above and the modifications described above also fall within the scope of the present disclosure.
An embodiment of the present disclosure is applicable for use in efficient suppression of the influence of a fraudulent ECU in an in-vehicle network system.
Number | Date | Country | Kind |
---|---|---|---|
2015-032179 | Feb 2015 | JP | national |
This is a continuation of U.S. patent application Ser. No. 16/788,641, filed Feb. 12, 2020, which is a continuation of U.S. patent application Ser. No. 16/207,875, filed Dec. 3, 2018 and now U.S. Pat. No. 10,609,049 issued Mar. 31, 2020, which is a continuation of U.S. patent application Ser. No. 15/183,398, filed Jun. 15, 2016 and now U.S. Pat. No. 10,187,406 issued Jan. 22, 2019, which is a continuation of Int. Pat. Appl. No. PCT/JP2015/001602, filed Mar. 23, 2015, which claims the benefit of U.S. Prov. Pat. Appl. No. 61/980,821, filed Apr. 17, 2014, and priority to Jap. Pat. Appl. No. 2015-032179, filed Feb. 20, 2015. The disclosure of each of the above-mentioned documents, including the specification, drawings, and claims, is incorporated herein by reference in its entirety.
Number | Name | Date | Kind |
---|---|---|---|
20060119401 | Kitagawa et al. | Jun 2006 | A1 |
20130073121 | Kim | Mar 2013 | A1 |
20130303120 | Kusumoto | Nov 2013 | A1 |
20130326255 | Kodama et al. | Dec 2013 | A1 |
20140328352 | Mabuchi et al. | Nov 2014 | A1 |
20150066239 | Mabuchi | Mar 2015 | A1 |
20160173530 | Miyake | Jun 2016 | A1 |
Number | Date | Country |
---|---|---|
10-107805 | Apr 1998 | JP |
2003-271205 | Sep 2003 | JP |
2004-253908 | Sep 2004 | JP |
2005-038099 | Feb 2005 | JP |
2007-038904 | Feb 2007 | JP |
2013-131907 | Jul 2013 | JP |
2012124207 | Sep 2012 | WO |
2013094072 | Jun 2013 | WO |
2013122177 | Aug 2013 | WO |
Entry |
---|
The Extended European Search Report dated Mar. 2, 2017 for the related European Patent Application No. 15779570.9. |
Muter M et al: “A structured approach to anomaly detection for in-vehicle networks”, Information Assurance and Security (IAS), 2010 Sixth International Conference on, IEEE, Piscataway, NJ, USA, Aug. 23, 2010 (Aug. 23, 2010), pp. 92-98, XP031777189. |
International Search Report of PCT application No. PCT/JP2015/001602 dated May 26, 2015. |
CAN Specification Version 2.0, 1991, [online] CAN in Automation(CiA), [searched on Nov. 14, 2014], Internet<URL:http://www.can-cia.org/fileadmin/cia/specifications/CAN20- A.pdf>. |
H. Krawczyk et al., “HMAC: Keyed-Hashing for Message Authentication” Network Working Group, RFC2104, Feb. 1997. |
Communication pursuant to Article 94(3) EPC from the European Patent Office (EPO) dated Oct. 1, 2019 for the related European Patent Application No. 15779570.9. |
Number | Date | Country | |
---|---|---|---|
20230016161 A1 | Jan 2023 | US |
Number | Date | Country | |
---|---|---|---|
61980821 | Apr 2014 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 16788641 | Feb 2020 | US |
Child | 17945752 | US | |
Parent | 16207875 | Dec 2018 | US |
Child | 16788641 | US | |
Parent | 15183398 | Jun 2016 | US |
Child | 16207875 | US | |
Parent | PCT/JP2015/001602 | Mar 2015 | US |
Child | 15183398 | US |