WO2011114621A1 - プログラム実行装置、情報処理方法、情報処理プログラム、記録媒体及び集積回路 - Google Patents

プログラム実行装置、情報処理方法、情報処理プログラム、記録媒体及び集積回路 Download PDF

Info

Publication number
WO2011114621A1
WO2011114621A1 PCT/JP2011/000900 JP2011000900W WO2011114621A1 WO 2011114621 A1 WO2011114621 A1 WO 2011114621A1 JP 2011000900 W JP2011000900 W JP 2011000900W WO 2011114621 A1 WO2011114621 A1 WO 2011114621A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
falsification
information
information processing
cpu usage
Prior art date
Application number
PCT/JP2011/000900
Other languages
English (en)
French (fr)
Inventor
倉内 伸和
Original Assignee
パナソニック株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by パナソニック株式会社 filed Critical パナソニック株式会社
Publication of WO2011114621A1 publication Critical patent/WO2011114621A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow

Definitions

  • the present invention relates to a program execution device for executing a user program, and more particularly to a technique for detecting falsification of a user program.
  • program execution devices such as portable terminals
  • programs user programs
  • content providers and the like are downloaded and executed after shipment of the program execution device
  • the number of forms is increasing.
  • the program execution device holds a variety of important information to be protected (protection information), and ensures security by permitting the use of the protection information only to authorized user programs that have received authentication or the like. Yes.
  • the protection information can be used illegally if the user program is tampered with, etc.
  • the program execution device detects that the user program has been tampered with and prevents the user program being tampered with from handling the protection information. Measures are being taken.
  • the program execution device includes a normal mode in which a normal OS (Operating System) and a program operate, and a secure mode in which a specific secure OS, a secure program, a secure device driver, and the like operate to perform protection information processing (patent) Reference 1 and Patent Reference 2).
  • a normal OS Operating System
  • a secure mode in which a specific secure OS, a secure program, a secure device driver, and the like operate to perform protection information processing (patent) Reference 1 and Patent Reference 2).
  • the normal mode the boot code, the OS, the falsification inspection unit, the protection information processing reception unit, and the user program programs operate.
  • the secure mode the secure OS and the protection information processing unit programs operate. Next, the operation of these programs will be described.
  • the program execution device is powered on, the normal mode is entered and the boot code is activated.
  • the boot code checks the OS and the falsification checking means for falsification, and if there is no falsification, starts the OS, and if there is falsification, cancels the activation.
  • the activated OS activates the falsification inspection unit and requests the falsification inspection unit to falsify the user program.
  • the falsification inspection means inspects whether the user program has been falsified and notifies the OS of the result. If tampering is not detected in the user program, the OS records that the program tampering check has been completed in the tampering detection status information via the secure OS, and then activates the user program.
  • the falsification detection state information indicates whether or not the falsification check has been completed for the user program, and is information that can be referred to and rewritten only in the secure mode.
  • the user program requests the protected information processing means for the protected information processing through the protected information processing accepting means.
  • the protection information processing acceptance unit switches the normal mode to the secure mode.
  • the protection information processing means confirms the falsification detection state information, and when it is in the program falsification check completed state, performs the protection information processing and notifies the user program of the result of the protection information processing. As described above, it is guaranteed that only the user program subjected to the tampering inspection is started.
  • the user program can be tampered with after the tampering check. That is, when the user program requests protection information processing from the protection information processing unit, the user program enters a waiting state until the protection information processing by the protection information processing unit is completed. The user program also enters a waiting state until input / output by the device driver is completed, for example, when requesting the device driver to write or read data to or from the hard disk.
  • the user program in the main memory may be swapped to a recording medium such as a hard disk, and the swapped user program can be tampered with.
  • the altered user program returns to the main memory, the protected information is handled by the altered user program.
  • the user program is not swapped when waiting for input / output, but when the input / output is completed, if the user program is reloaded into the main memory, the user program is altered before the reload. If so, there is a problem that the altered user program is executed and the protection information is handled.
  • an object of the present invention is to provide a program execution device that more reliably detects falsification of a user program.
  • the present invention provides a program execution device that securely executes a program, a scheduling unit that waits for allocation of a CPU usage right for the program, and a falsification inspection unit that inspects falsification of the program. And a program monitoring means for causing the falsification checking means to check for falsification of the program from when the program waits for CPU usage rights to be assigned.
  • the program execution apparatus has the above-described configuration, so that even if the CPU usage right is deprived due to an input / output wait or the like until the end of execution of the program, the CPU usage right is next. Since the program is always subjected to a falsification check before the CPU usage right is assigned, the program falsification can be detected more reliably.
  • DataBase DataBase
  • a program execution device is a program execution device that securely executes a program, and a scheduling unit that waits for allocation of a CPU usage right for the program, and a falsification inspection unit that inspects the falsification of the program And a program monitoring means for causing the falsification checking means to check for falsification of the program from when the program waits for CPU usage rights to be assigned.
  • the program monitoring means holds falsification information indicating a falsification state of the program, and sets the falsification information to indicate that the falsification has not been inspected when the program waits for CPU usage right allocation.
  • the tampering information may be set to indicate that the tampering inspection has been completed when the tampering of the program is inspected.
  • the program monitoring means can more surely grasp that the program is in the unchecked state when waiting for the CPU allocation by referring to the falsification information.
  • the program monitoring means sets the falsification information to indicate whether the falsification inspection has been completed by setting whether or not falsification is detected as a result of the falsification inspection by the falsification detection means.
  • the program may be executed when the falsification information indicates no falsification.
  • the program execution device further includes protection information processing means for securely processing protected information, and the program requests the protection information processing means for the secure processing, and the protection information processing means
  • the means may suppress execution of secure processing for the protected information when the falsification information indicates that the falsification has not been inspected.
  • the protection information processing unit can grasp whether or not the program has not been falsified by referring to the falsification information, and execute secure processing for a request from a program that has not been falsified. And the security of the device can be secured.
  • the protection information processing means requests the program monitoring means to check for alteration of the program, and the program monitoring means receives the request after the falsification information is set to indicate that the falsification has not been checked.
  • the tampering inspection using the tampering inspection means for the program may be performed.
  • the program monitoring unit since the program monitoring unit always performs the falsification inspection before the protected information processing is performed by the protection information processing unit after the falsification information is set to indicate that the falsification has not been performed, It is possible to prevent the result of the protection information processing from being used by a program that is an inspection, and to ensure the security of the own device.
  • the program execution device further includes a normal mode in which processing relating to the protected information is prohibited, and a secure mode in which processing relating to the protected information is permitted and protected from a program operating in the normal mode.
  • the program monitoring means and the protection information processing means may be executed in a secure mode.
  • the program monitoring unit and the protection information processing unit are operated in a secure mode using generally expensive resources such as an on-chip memory in an LSI, and the program and the falsification inspection unit are in a normal mode.
  • programs and tamper detection means can be reduced in cost, and program execution by spending a lot of time in decrypting programs and verifying signatures in secure mode A decrease in the overall processing performance of the apparatus can be avoided.
  • protection information processing for the programs that can be freely created or downloaded by the user it is necessary to prohibit protection information processing for the programs that can be freely created or downloaded by the user.
  • this configuration this can be avoided, and as a result, the program execution device In this case, it is possible to avoid the loss of expandability.
  • the security of the own apparatus can be further strengthened as compared with the case of operating in the normal mode.
  • the program execution device further includes a read-only storage area, and the read-only storage area stores a boot code that is executed first when the program execution device is powered on.
  • the boot code may detect falsification of the scheduling unit, the program monitoring unit, and the protection information processing unit.
  • the program is in an executable state waiting for CPU usage right assignment at the start of execution. From the start of execution to the end of execution, the executable state, the execution state to which the CPU usage right is assigned, and the program The program monitoring means detects that the scheduling means causes the program to transition from the wait state to the executable state, waiting for the conditions for enabling execution to be met. Then, it is possible to cause the falsification inspection means to inspect the falsification of the program before the CPU usage right is assigned to the program.
  • the program monitoring means generates falsification information each time the program transitions from the waiting state to the executable state, sets the falsification information to indicate that the falsification has not been inspected, and the program transitions to the waiting state. In such a case, the falsification information may be deleted.
  • the program monitoring means may generate the falsification information when the program is activated, and set the falsification information to indicate that the falsification has not been inspected.
  • the program monitoring means may further delete the falsification information of the program at regular intervals.
  • an inquiry about the falsification information extends over the end of the program, and even if there is a falsification between the end of the program and the start of the program, it can be detected.
  • the scheduling means and the falsification checking means are realized by a CPU operating according to a computer program, and at least one of the scheduling means and the falsification checking means is loaded and resident in a main memory with a read-only attribute. It is good as well.
  • scheduling means and the falsification checking means may be computer programs, and at least one of the scheduling means and the falsification checking means may be loaded in a non-swapped area in the main memory.
  • At least one of the scheduling unit and the falsification inspection unit can be executed securely without being falsified.
  • the program is accompanied by identification information of the program, and the scheduling means includes an executable queue, and adding the identification information to the executable queue makes the program a CPU usage right. It is also possible to wait for allocation.
  • the scheduling means may add the information related to the program to a process control block for recording information related to the program, thereby waiting for the CPU usage right allocation.
  • the program requests the program monitoring unit to detect its own falsification, and the program monitoring unit performs falsification inspection on the program before the execution of the secure process after receiving the request. Also good.
  • the timing of the falsification inspection can be further determined on the program side.
  • the falsification inspection unit arranges information necessary for determining whether or not falsification is present in an area that can be referred to by the program monitoring unit. It may be determined whether or not has been falsified.
  • An information processing method is an information processing method for securely executing a program, wherein the program waits for CPU usage right assignment, and the program waits for CPU usage right assignment. And a program monitoring step for checking the alteration of the program before the CPU usage right is assigned.
  • An information processing program is an information processing program for securely executing a program, wherein the program waits for CPU usage right assignment, and the program waits for CPU usage right assignment. And a program monitoring step for checking the alteration of the program before the CPU usage right is assigned.
  • a recording medium is a computer-readable recording medium on which an information processing program for securely executing a program is recorded.
  • the information processing program assigns a program to a CPU usage right. And a starting step for waiting, and a program monitoring step for checking whether the program has been tampered with or not until the CPU usage right is assigned.
  • An integrated circuit is an integrated circuit that securely executes a program, a scheduling unit that waits for allocation of a CPU usage right for the program, a tampering inspection unit that inspects tampering of the program, Program monitoring means for monitoring the scheduling means and checking the alteration of the program using the falsification checking means from when the program waits for CPU usage right assignment until the CPU usage right is assigned.
  • FIG. 1 is a diagram showing a configuration of a program execution device 1 according to an embodiment of the present invention.
  • the program execution device 1 includes scheduling means 3 for waiting the program 2 for CPU usage right allocation, falsification checking means 4 for checking falsification of the program 2, and program monitoring means 5.
  • the program monitoring means 5 monitors the scheduling means 3 and inspects the alteration of the program 2 by using the falsification checking means 4 after the program 2 waits for CPU usage right assignment until the CPU usage right is assigned.
  • the tampering inspection can always be performed when the CPU usage right is assigned to the program 2. While the program 2 is being executed, the program 2 may transition to a waiting state due to an input / output wait or the like, and at this time, the program 2 may be swapped to a hard disk or the like. Even if the swapped program 2 is falsified, the CPU usage right is awaited when the swapped program 2 is loaded into the main memory. However, since the tampering inspection is always performed after the CPU usage right is waited to be allocated, the tampering inspection is always performed before the CPU usage right is actually allocated.
  • Embodiment 2 The program execution device 1 in the above embodiment will be described more specifically.
  • the falsification detection device 100 as the program execution device 1 will be described as an example.
  • the falsification detection device 100 includes a CPU (Central Processing Unit) microprocessor, a hard disk, a ROM (Read Only Memory), a RAM (Random Access Memory), a nonvolatile memory such as a flash memory, an LSI (Large Scale Integration), a display unit, and a keypad. It is a computer system composed of A computer program is stored in the ROM or the hard disk unit, and the CPU operates according to the computer program read onto the RAM, so that the falsification detection device 100 achieves its function.
  • the LSI is provided with an on-chip memory (secure memory) or the like in which recorded contents cannot be tampered with in order to store information that needs to be protected from tampering.
  • the falsification detection device 100 is a portable information terminal such as a mobile phone, Android (registered trademark), iPhone (registered trademark), or the like.
  • the falsification detection device 100 is an information processing device such as an AV device such as a television, a recorder, or a player, a communication device such as a digital camera, or a FAX.
  • an AV device such as a television, a recorder, or a player
  • a communication device such as a digital camera, or a FAX.
  • FIG. 2 is a program configuration diagram of the falsification detection device 100 according to the present embodiment.
  • the falsification detection device 100 includes two modes: a secure mode in which a program is protected from falsification and the like and operates securely, and a normal mode in which a program that does not need to be operated securely is operated.
  • a program that operates in the secure mode has high reliability because it is arranged in the secure memory, and processing related to protected information that is not permitted for a program that operates in the normal mode is permitted.
  • a program that operates in the secure mode is encrypted or signed with a certain secret key, and only a specific developer is permitted to create the program.
  • the falsification detection apparatus 100 includes a user program and falsification detection means 105 such as a boot code 101 that operates in a normal mode, an OS (Operating System) 102, a protection information reception means 103, a user program 104.
  • a secure OS 110 that operates in the secure mode
  • a protection information processing unit 111 and a startup program monitoring unit 112 are included.
  • the falsification detection unit 105 corresponds to the falsification inspection unit 4 described above
  • the activation program monitoring unit 112 corresponds to the program monitoring unit 5 described above.
  • the user program 104 ... Corresponds to the program 2 described above.
  • the falsification detection state 114 is information recorded in the secure memory, and indicates a falsification state (separate whether falsification is not checked, whether falsification is present or not falsified) for each program.
  • the falsification detection state 114 can be rewritten only from the boot code 101 and the program on the secure mode, and is used to determine whether or not the program can be started.
  • FIG. 3 is a diagram illustrating an example of the falsification detection state 114.
  • the falsification detection information 114 is specifically a list of a set of a PID that is an identifier for each process related to a program and a falsification state of the program. For example, in the case of FIG. 3, the falsification state of the program whose PID is 102 is not falsified.
  • the boot code 101 is a program that is executed first when the power of the falsification detection device 100 is turned on, and is recorded in a non-rewritable ROM area.
  • the boot code 101 inspects alteration of the OS 102, the falsification detection unit 105, the secure OS 110, the protection information processing unit 111, the activation program monitoring unit 112, and the like, which are programs that require trust.
  • necessary processing such as stopping the activation of the tampering detection apparatus 100 or limiting the function is performed.
  • the boot code 101 records “no falsification” in the falsification detection state 114 as the falsification state of the OS, and starts the OS 102.
  • the boot code 101 is a highly reliable program that cannot be rewritten, the falsification detection state 114 is exceptionally rewritable.
  • the OS 102 is an operating system, activates the falsification detection means 105, and activates the user program 104.
  • the OS 102 is Linux (registered trademark) as an example, but other OSs having similar functions may be used.
  • the OS 102 includes a program starting unit 121, a starting program information recording unit 122, a program executing unit 123, and a file system 124.
  • the program activation unit 121 receives a program activation request from another program, generates and initializes program information, and notifies the activation program information recording unit 122.
  • the program information includes an identifier (PID) of a program registered in an executable queue that will be described later.
  • the program starting means 121 is a fork system call as an example, but may be another program or the like.
  • the activation program information recording unit 122 records the program information notified from the program activation unit 121. Also, a program information change request is received from a specific reliable program such as the OS 102, the program information is changed in accordance with the change request, and a deletion request is received and deleted.
  • the program execution means 123 executes the program according to the program information recorded in the startup program information recording means 122.
  • Examples of the program execution unit 123 include a CPU scheduler that performs CPU scheduling, and a dispatcher that saves a currently executing process in a process control block, and assigns the CPU to the process to be executed according to the process control block of the process to be executed next. Etc.
  • the program execution unit 123 corresponds to the scheduling unit 3 described above.
  • FIG. 4 is a state transition diagram of a user program executed in the falsification detection apparatus 100.
  • the user program can take three states: an executable state 401, an execution state 402, and a wait state 403.
  • the executable state 401 is a state indicating that execution is possible if a CPU is assigned.
  • the program transits to an execution state 402, which is a state in which the program is actually executed.
  • the execution state 402 when the time in which the CPU assigned to the program can be used is used up or when another program having a higher priority enters the executable state 401, the state transitions to the executable state 401. .
  • the program in the execution state 402 is waiting for an input / output such as file access, when waiting for an event to synchronize with another program, etc., when the program itself sleeps and abandons the CPU allocation, etc. Then, the state transits to the waiting state 403.
  • the program in the wait state 403 transitions from the wait state 403 to the executable state 401 when an input / output completion or event that the program is waiting for occurs.
  • the CPU in the waiting state 403 is not assigned until the program transitions to the executable state 401.
  • the process control block It is recorded in the process control block whether the program is in one of the executable state 401, the execution state 402, or the waiting state 403.
  • the process control block is represented by a task_struct structure or the like.
  • FIG. 5 is a diagram illustrating an example of a process control block DB 500 that records a process control block for each program.
  • Each row (process control block) of the process control block DB 500 corresponds to one program.
  • the process control block includes a program ID 501, CPU save information 502, status 503, priority 504, remaining CPU time 505, and resource information 506. Consists of including.
  • information relating to one process is referred to as a process control block.
  • information corresponding to the process control block DB 500 in the present embodiment may be referred to as a process control block. .
  • the program ID 501 is a unique identifier assigned to each program and is used to identify the program.
  • the state 503 indicates whether the program is an executable state 401, an execution state 402, or a wait state 403 related to the state transition described above.
  • the executable state 401 and the execution state 402 are not distinguished from each other and are expressed as “executable”, and the state 503 is set to either “executable” or “waiting state”.
  • the executable state 401 and the execution state 402 may be distinguished from each other.
  • the CPU save information 502 is information used for resuming processing from the state before the transition when the program in the execution state 402 transits to another state, and the contents of the CPU register at the time of transition are saved.
  • the priority 504 indicates the priority when the program is executed, and specifically, “high”, “medium”, or “low” is set.
  • the priority 504 is used when the program execution unit 122 determines the next program to be executed from the executable queue, and is selected in the order of “medium” and “low” starting with a priority of “high”. .
  • the priority 504 is not fixed for each program, but is changed by the OS 102 according to the nature and status of the program.
  • CPU remaining time 505 indicates the remaining time that the program is allocated to the CPU and executed.
  • the CPU remaining time 505 is set to a predetermined time as an initial value when the CPU is assigned to the execution state 402 and assigned. Then, while the program uses the CPU, the CPU remaining time 505 is subtracted by the used time.
  • the program transits from the execution state 402 to the executable state 401 and is added to the tail of the corresponding priority queue in the executable queue described later. At this time, the program may be registered in an expired executable queue for a program that uses up the CPU remaining time 505 described later.
  • Resource information 506 is information representing resources such as memory and files used by the program, and is used when these resources are referenced or when resources are released at the end of the program. Specifically, the resource information 506 includes an address where a program entity, data, stack, and the like are arranged, a file descriptor of a file being opened, and the like.
  • Each process control block includes information such as a parent program ID and a group ID, but the description is omitted because it is not related to the description of the embodiment of the present invention.
  • the executable queue 600 is queued in a first-in first-out manner in a queue in which the PID of the program in the executable state 401 is provided for each priority.
  • the executable queue is represented by a data structure called a RUN queue.
  • FIG. 6 is a schematic diagram illustrating an example of the executable queue 600.
  • the executable queue 600 includes a high priority queue 601 corresponding to a program whose priority 504 is “high”, a medium priority queue 602 corresponding to a program whose priority 504 is “medium”, and a priority 504 “ It consists of a low priority queue 603 corresponding to the “low” program.
  • Each queue represents a head at the right end and a tail at the left end in the drawing, and programs recorded in the same queue are assigned and executed in order from the program related to the PID recorded at the head of the queue. Further, when PIDs are recorded in queues having different priorities, the CPU is assigned and executed first from the program in which the PIDs are recorded in the high priority queues.
  • the PID of the program is queued in the queue corresponding to the priority of the program.
  • the PID is deleted from the executable queue 600, and the program relating to the PID that is the head of the queue next enters the execution state 402.
  • the PID of the program is deleted from the queued executable queue 600 and is added to the end of the executable queue 600. To be recorded.
  • FIG. 7 is a flowchart showing a procedure of processing in which the program execution means 122 changes the assignment of CPUs to programs.
  • the program execution means 122 starts from a state where a CPU is assigned to a certain program.
  • the program execution means 122 waits for the program to which the CPU is currently assigned to transition from the execution state 402 to the executable state 401 or the wait state 403 (S1).
  • the contents of the CPU register of the transitioning program are saved in the CPU saving information 502 of the process control block 500 (S2).
  • the program execution means 122 determines whether or not the PID is recorded in any priority queue of the executable queue 600 (S3).
  • the PID is stored. Wait for it to be added.
  • the program execution unit 122 acquires the first element (PID) of the high priority queue 601 if the high priority queue 601 is not empty (S4: N), and the acquired element is Delete from the queue (S5).
  • the program execution means 122 acquires the first element of the medium priority queue 602 if the medium priority queue 602 is not empty (S6: N), The acquired element is deleted from the queue (S7).
  • the medium priority queue 602 is empty (S6: Y)
  • the top element of the low priority queue 603 is acquired and the element is deleted from the queue (S8).
  • the program execution unit 122 assigns a CPU to the program related to the element acquired in any of S5, S7, and S8 according to the CPU save information 502 of the process control block 500.
  • an element 604 with a program ID of 100 registered at the top of the high priority queue 601 is selected.
  • the program IDs “103”, “101”, “104”, and “102” are selected and executed in this order.
  • it in order for a program to be assigned and executed by a CPU, it must be added to any priority queue in the executable queue 600.
  • a queue with priority is given here as an example of the executable queue 600, a single queue, other data structures, and algorithms may be used.
  • the executable queue 600 is one set.
  • a program that uses an active execution queue and an expired execution queue and uses up the remaining CPU time 505 is an expired execution queue.
  • the active execution queue becomes empty, the active execution queue and the expired execution queue may be exchanged. By doing so, it can be configured to guarantee that a CPU is always assigned to a low priority program.
  • the program information is PID in the executable queue, but any information that can grasp the timing at which the program is executed may be used.
  • a process control block or the like may be used.
  • the protected information processing accepting unit 103 switches between the normal mode and the secure mode, accepts a processing request for the protecting information processing unit 111 from the user program 104 or the like, and requests the accepted processing from the secure OS 110.
  • the secure OS 110 is an operating system that operates in a secure mode.
  • the secure OS 110 receives a processing request for the protected information processing unit 111 from the protected information processing accepting unit 103 and calls the protected information processing unit 111. It is assumed that the processing request includes an ID for identifying the request source program.
  • the protection information processing unit 111 When the protection information processing unit 111 receives a protection information processing request from the user program 104 or the like via the secure OS 110, the protection information processing unit 111 confirms the falsification state identified by the request source PID recorded in the falsification detection state 114, When the falsification state indicates no falsification, protection information processing is executed.
  • the protection information processing includes, for example, key setting, right information operation, personal information processing, and the like. Then, the execution result of the protected information processing is notified to the request source program via the secure OS 110 and the protected information processing accepting unit 103.
  • the activation program monitoring unit 112 monitors the program information recorded in the activation program information recording unit 122, and manages the falsification detection state 114. In particular, since the executable queue necessary for CPU allocation is monitored and it is determined whether or not the program to which the CPU is allocated has been detected as being falsified, the falsification of the program operating on the falsification detection device 100 is more reliably ensured. Can be detected.
  • the falsification detection state 114 will be described supplementarily.
  • falsification information is held for each program registered in the executable queue 600.
  • the activation program monitoring unit 112 holds the falsification information that has not been checked for falsification. Thereafter, the falsification information of the program in which falsification is not detected by the falsification detection unit 105 is updated as falsification information is not updated, and the falsification information of the program in which falsification is detected is updated as falsified.
  • the PID related to the program is deleted from the executable queue 600, or when the program ends and the program information is deleted from the process control block 500 by the activation program information recording unit 122 in response to a request from the OS 102 or the like,
  • the falsification information is deleted by the activation program monitoring unit 112.
  • the timing of deleting the falsification information for each program from the falsification detection state 114 when the program is deleted from the executable queue 600, falsification of the program is detected every time the program enters the wait state 403. Since it is necessary, the responsiveness of the falsification detection device 300 deteriorates, but the security strength can be increased. For example, if a program that has been checked for tampering is swapped out from memory to a hard disk or the like and tampered with at the swap-out destination, CPU scheduling is generally shorter than swapping scheduling, so tampering at the swap-out destination Can be detected.
  • the boot code 101 is activated to detect falsification of the OS 102, the protection information reception means 103, and the falsification detection means 105 (S21).
  • the processing that threatens the security due to tampering in the tampering detection apparatus 100 is stopped, or the processing other than the processing for recovering from tampering is terminated. .
  • the boot code 101 activates the OS 102 and the protected information processing means 103 (S23), and the boot code 101 ends the process (S24).
  • the OS 102 activates a user program such as the user program 104 (S25). Then, it waits until the user program 104 is added to the executable queue (S26: N). At this time, user programs that do not require protection information processing are executed in parallel.
  • the protection information processing accepting means 103 switches to the secure mode (S27), and the activation program monitoring means 112 determines the PID of the user program 104. Then, the falsification state indicating “not falsified check” is recorded in the falsification detection state 114 (S28).
  • the activation program monitoring unit 112 switches to the normal mode using the protection information processing reception unit 103 (S29).
  • the protection information processing accepting means 103 is requested by the user program 104 (S30), or the PID of the user program is deleted from the executable queue (S41) (S30: N and S41: N).
  • the protection information processing acceptance means 103 When the protection information processing acceptance means 103 is requested by the user program 104 to the protection information processing acceptance means 103 (S30: Y), the protection information processing acceptance means 103 switches to the secure mode (S44). Then, the protection information processing unit 111 inquires of the activation program monitoring unit 112 about the user program 104 that requested the protection information processing and the falsification information (S45). The activation program monitoring unit 112 confirms the falsification information in the falsification detection state 114 of the user program 104 inquired from the protection information processing unit 111 (S46).
  • the falsification detection unit A request for falsification detection information related to the user program 104 to 105 is notified to the protected information processing accepting means 103 via the secure OS 110 (S48).
  • the protected information processing accepting unit 103 switches to the normal mode (S49).
  • the falsification detection unit 105 generates falsification detection information necessary for determining whether or not the user program 104 has been falsified, and notifies the protection information processing reception unit 103 (S61).
  • the falsification detection information is a result of performing a predetermined hash value calculation, encryption, signature calculation, etc., with the execution code of the user program 104 recorded in the nonvolatile memory 106 as an input.
  • the protection information processing means 103 switches to the secure mode (S62).
  • the activation program monitoring unit 112 receives the falsification detection information, determines whether or not falsification is detected based on whether or not it matches the expected value generated in advance in a highly reliable environment (S63), and the determination result (falsification present / “No falsification” is reflected in the falsification information in the falsification detection state 114 (S64), and the protection information processing means 111 is notified.
  • tamper detection may be performed by other methods. For example, an execution code of a program developed on the RAM instead of the nonvolatile memory 106 may be input. Further, an authentication method using a default password or the like may be used in order to confirm that the program is from a legitimate creator without using a hash value or the like.
  • the protection information processing means 111 executes the protection information processing requested by the user program 104 only when the falsification information in the received falsification detection state 114 indicates no falsification (S65: Y) (S66). Then, it requests the protected information processing accepting means 103 to notify the user program 104 of the execution result of the protected information processing (S67).
  • the protected information processing acceptance means 103 switches to the normal mode (S69), notifies the user program 104 of the information requested for notification (S70), and proceeds to S30.
  • S47 If it is determined in S47 that the falsification information is not checked for falsification (S47: N), S48 to S64 are not performed, and the process proceeds to S65.
  • the falsification detection apparatus 100 sets the falsification information related to the falsification detection state 114 of the program when the user program 104 is activated so as to indicate that the falsification is not checked.
  • the falsification information related to the falsification detection state 114 of the user program 104 is not falsified, and when falsification is detected, the falsification information is falsified. Yes. Only when no falsification is indicated, the protection information processing is permitted for the user program 104, and the program falsification information is deleted from the falsification detection state 114 when the user program 104 ends.
  • the program and the falsification detection unit 105 are operated in the normal mode 101, it is possible to more reliably detect the falsification of the program without incurring resource increase of the falsification detection apparatus 100, processing performance degradation, and loss of scalability. .
  • the activation program monitoring unit 112 registers “unchecked” as falsification information, but does not wait for a request for protection information processing at the same time as registration.
  • the falsification detection information may be requested to the falsification detection means 105.
  • the falsification detection information can be created prior to the request for the protection information processing. Therefore, when the user program 104 requests protection information processing, the protection information processing can be performed promptly without waiting for the time that the falsification detection information is created before starting the protection information processing.
  • the user program 104 may make a falsification information generation request at a timing before requesting the protection information processing to the activation program monitoring unit 112. Even in this case, the falsification detection information can be created before the protection information processing is requested.
  • the activation program information recording unit 122 is operated in the normal mode.
  • the present invention is not limited to this.
  • the activation program information recording unit 122 may operate in the secure mode.
  • the program information is changed to the starting program information recording unit 122 in the secure mode through the protected information processing receiving unit 103 and the secure OS 110. Will be requested.
  • the falsification detection device 100 has been described as an example of operating while switching between the normal mode and the secure mode, but is not limited thereto.
  • the tampering detection apparatus 100 may be configured such that the normal mode and the secure mode operate in parallel. In this case, it is possible to eliminate the overhead for switching that occurs each time switching between the secure processing and the normal mode.
  • addition or deletion of program information can be constantly monitored by the activation program monitoring unit 112.
  • the falsification detection device 100 includes a single CPU, but may include a plurality of CPUs.
  • the falsification detection unit 105 detects falsification by the boot code 101 when the power of the falsification detection device 100 is turned on. It may be resident in
  • the falsification detection process for the falsification detection unit 105 ends and resides in the memory, even if the falsification detection unit 105 program recorded in the non-volatile memory is falsified, it remains resident before falsification. Since the correct falsification detection process is executed by the falsification detection means, it is possible to prevent the falsification detection process from affecting the falsification detection process.
  • the falsification detection means 105 may be expanded and executed in an area that is not swapped by the OS 102. Thereby, it is possible to prevent the falsification detection means 105 from being falsified on the swap file. Further, not only the falsification detection means 105 but also the security program components such as the activation program information recording means 122, the program activation means 121, the program execution means 123, and the protected information processing acceptance means 103 are expanded and executed in a non-swap area. It is also good to do.
  • the program information is always monitored by the activation program monitoring unit 112.
  • the protection information processing unit 111 or the user program 104 that requires protection information processing is changed to the activation program monitoring unit 112.
  • the program information may be confirmed, and the falsification detection state of the program may be added and deleted.
  • the program size of the activation program monitoring unit 112 can be suppressed, and resource increase, processing performance degradation, and scalability loss of the falsification detection device 100 can be further suppressed.
  • the alteration information in the alteration detection state 114 may be deleted at regular intervals. Thereby, when the activation program monitoring means 112 confirms the program information related to the falsification detection state 114, the inquiry of the falsification detection state 114 straddles the end of the program, and the program is falsified between the end of the program and the program activation. If so, it can be detected.
  • the falsification detection information is created by the falsification detection means 105, but the present invention is not limited to this.
  • the falsification detection unit 105 arranges information necessary for creating falsification detection information in an area that can be referred to by the activation program monitoring unit 112, and the activation program monitoring unit 112 uses the necessary information to detect falsification detection information. It is good also as carrying out creation of. Thereby, falsification of the falsification detection information itself can be prevented.
  • the falsification information is deleted from the falsification detection state 114 of the program.
  • the program ends and responds to a request from the OS 102 or the like.
  • the falsification information of the program may be deleted from the falsification detection state 114.
  • the falsification detection device when the falsification detection device loads a program such as an OS or a user program into the memory, it may be loaded with a read-only attribute. Further, a part or all of the loaded program may be resident in the memory.
  • the OS including the program starting unit 121, the starting program information recording unit 122, the program executing unit 123, and the file system 124, and the falsification detecting unit 105 are read-only attributes on the memory from the viewpoint of information processing efficiency and security. It is better to be loaded and reside in memory.
  • the setting of the read-only attribute has a function in which hardware such as a memory has a function of loading a program with the read-only attribute, and may be performed in hardware, or related to a system such as the boot code 101 or the OS 102.
  • the software may perform access control in software so that the program on the memory is not rewritten.
  • the present invention may be an information processing method or information processing program including the steps described below.
  • FIG. 12 is a diagram showing an information processing method applied to the program execution device according to an embodiment of the present invention, and processing related to the information processing program.
  • the program waits for CPU usage right allocation.
  • the program monitoring step S102
  • the program is inspected for falsification after the program waits for CPU usage right assignment until the CPU usage right is assigned.
  • a program execution device, a program execution method, a program, a recording medium, and an integrated circuit according to the present invention are used for a mobile phone, a portable information terminal, and the like that handle information that needs to be protected from unauthorized access, such as movies, music, and personal information. And is produced, transferred, etc. by companies that handle these terminals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

 本発明は、高価なリソースを増やすことなく、ユーザプログラムの改竄をより確実に検出するプログラム実行装置を提供することを目的とする。プログラムスケジューリング手段121は、ユーザプログラム104が起動され実行可能状態となった場合に、起動プログラム情報記録手段122にユーザプログラムに係るプログラム情報を記録する。起動プログラム監視手段112は、プログラム情報が記録されるのを監視しており、ユーザプログラム104が改竄未検査である旨を改竄検出状態114に記録する。ユーザプログラム104が実行状態になるまでに、改竄検出状態114が改竄未検査を示している場合、改竄検出手段105に改竄を検出させる。

Description

プログラム実行装置、情報処理方法、情報処理プログラム、記録媒体及び集積回路
 本発明は、ユーザプログラムを実行するプログラム実行装置に関し、特に、ユーザプログラムの改竄を検出する技術に関する。
 近年、携帯端末等のプログラム実行装置に関し、プログラム実行装置の製造者により作成されたプログラム以外にも、コンテンツ提供者等により作成されたプログラム(ユーザプログラム)が、プログラム実行装置の出荷後にダウンロードされ実行される形態が増えている。プログラム実行装置には、種々の保護されるべき重要な情報(保護情報)が保持されており、認証等を受けた正規のユーザプログラムのみに保護情報の使用を許可することでセキュリティを確保している。特に、ユーザプログラムが改竄等されてしまうと保護情報が不正に使用され得るので、プログラム実行装置では、ユーザプログラムの改竄を検出し、改竄されているユーザプログラムには保護情報を扱わせないなどとして対策を行っている。
 ここで、保護情報をセキュアに処理する従来のプログラム実行装置の一例について具体的に説明する。プログラム実行装置は、通常のOS(Operating System)やプログラムが動作する通常モードと、特定のセキュアOSやセキュアプログラム、セキュアデバイスドライバ等が動作し、保護情報処理を行うセキュアモードとを搭載する(特許文献1、特許文献2参照)。通常モードでは、ブートコード、OS、改竄検査手段、保護情報処理受付手段及びユーザプログラムの各プログラムが動作し、セキュアモードでは、セキュアOS及び保護情報処理手段の各プログラムが動作する。次に、これらプログラムの動作について説明する。プログラム実行装置に電源が投入されると、通常モードになりブートコードが起動される。ブートコードは、OS、改竄検査手段に改竄がないかチェックして改竄が無ければOSを起動し、改竄があれば起動を取りやめる。起動されたOSは改竄検査手段を起動し、改竄検査手段にユーザプログラムの改竄検査を要求する。
 改竄検査手段は、ユーザプログラムの改竄有無を検査しその結果をOSに通知する。ユーザプログラムに改竄が検出されなかった場合、OSは、セキュアOSを介して改竄検出状態情報にプログラム改竄チェック済みである旨を記録した後、ユーザプログラムを起動する。ここで、改竄検出状態情報は、ユーザプログラムについて改竄チェック済みであるか否かを示し、セキュアモードにおいてのみ参照、書換可能な情報である。
 ユーザプログラムは、保護情報処理受付手段を介して保護情報処理手段に対し保護情報処理を依頼する。保護情報処理受付手段は、通常モードをセキュアモードに切り替える。セキュアモードにおいて、保護情報処理手段は、改竄検出状態情報を確認し、プログラム改竄チェック済み状態であった場合、保護情報処理を行い、保護情報処理の結果をユーザプログラムに通知する。以上のようにして、改竄検査が行われたユーザプログラムのみが起動することを保証している。
特開2006-221631号公報 特開2005-227995号公報
 しかしながら、上述のようにユーザプログラムの起動時に必ず改竄チェックを行うとしても、その改竄チェック後にユーザプログラムが改竄され得るという問題がある。すなわち、ユーザプログラムは、保護情報処理手段に保護情報処理を依頼すると、保護情報処理手段による保護情報処理が完了するまで待ち状態に入る。また、ユーザプログラムは、ハードディスクに対するデータ書き込み、読み出しをデバイスドライバに対し依頼する場合などにも、デバイスドライバによる入出力が完了するまで待ち状態に入る。このように待ち状態に入ったときに、主記憶メモリ中のユーザプログラムがハードディスクなどの記録媒体にスワップする場合があり、このスワップされたユーザプログラムに改竄が成され得る。改竄されたユーザプログラムが主記憶メモリに復帰すると、改竄されたユーザプログラムにより保護情報が扱われてしまう。
 また、入出力待ちになった場合にユーザプログラムをスワップはしないが、入出力が完了した時に、改めてユーザプログラムを主記憶メモリに再ロードするよう構成した場合、その再ロード前にユーザプログラムが改竄されてしまうと、改竄されたユーザプログラムが実行され、保護情報が扱われてしまうという問題が生じる。
 上記問題に鑑み、本発明は、ユーザプログラムの改竄をより確実に検出するプログラム実行装置を提供することを目的とする。
 上記課題を解決するために、本発明は、プログラムをセキュアに実行するプログラム実行装置であって、プログラムをCPU使用権の割り当て待ちにするスケジューリング手段と、前記プログラムの改竄を検査する改竄検査手段と、前記プログラムがCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに前記改竄検査手段に前記プログラムの改竄を検査させるプログラム監視手段とを備える。
 本発明のプログラム実行装置は、上述の構成を備えることにより、プログラムの実行終了までの間に、入出力待ちなどの原因によりCPU使用権が剥奪された場合であっても、次にCPU使用権の割り当て待ちになりCPU使用権が割り当てられるまでに必ず改竄検査を受けるので、プログラムの改竄をより確実に検出することができる。
本発明の一実施の形態に係るプログラム実行装置1の構成を示す図である。 本発明の一実施の形態に係る改竄検出装置100のプログラム構成図である。 本発明の一実施の形態に係る改竄検出状態を示す図である。 本発明の一実施の形態に係る改竄検出装置において実行されるユーザプログラムの状態遷移を示す図である。 本発明の一実施の形態に係るプログラム毎のプロセス制御ブロックを記録するプロセス制御ブロックDB(DataBase)の一例を示す図である。 本発明の一実施の形態に係る実行可能待ち行列の一例を表す模式図である。 本発明の一実施の形態に係るプログラム実行手段によるCPU割り当てを変更する際のフローチャートである。 本発明の一実施の形態に係る改竄検出装置の起動から保護情報処理を行うまでの処理を示すフローチャートである。 本発明の一実施の形態に係る改竄検出装置の起動から保護情報処理を行うまでの処理を示すフローチャートである(図8の続き)。 本発明の一実施の形態に係る改竄検出装置の起動から保護情報処理を行うまでの処理を示すフローチャートである(図9の続き)。 本発明の一変形例に係るプログラム実行装置のプログラム構成図である。 本発明の一変形例に係るプログラム実行装置に適用されるプログラムの動作を示す図である。
 本発明の一実施態様であるプログラム実行装置は、プログラムをセキュアに実行するプログラム実行装置であって、プログラムをCPU使用権の割り当て待ちにするスケジューリング手段と、前記プログラムの改竄を検査する改竄検査手段と、前記プログラムがCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに前記改竄検査手段に前記プログラムの改竄を検査させるプログラム監視手段とを備える。
 また、前記プログラム監視手段は、前記プログラムの改竄状態を示す改竄情報を保持しており、前記プログラムがCPU使用権の割り当て待ちになったときに、前記改竄情報が改竄未検査を示すよう設定し、前記プログラムの改竄を検査したときに、前記改竄情報が改竄検査済みを示すよう設定するとしてもよい。
 この構成によれば、プログラム監視手段は、改竄情報を参照することで、プログラムがCPU割り当て待ちになったときに改竄未検査状態であることをより確実に把握できる。
 また、前記プログラム監視手段は、前記改竄情報に、前記改竄検出手段による改竄検査結果である改竄有無を設定することによって前記改竄情報が改竄検査済みを示すよう設定し、前記プログラム実行装置は、前記改竄情報が改竄無を示す場合に前記プログラムを実行することとしてもよい。
 この構成によれば、改竄情報を参照することで、改竄未検査であるか否かに加え、そのプログラムについての改竄の有無を把握できるので、改竄の無い安全なプログラムのみ実行し、自装置のセキュリティを確保することができる。
 また、前記プログラム実行装置は、さらに、保護された情報をセキュアに処理する保護情報処理手段を備えており、前記プログラムは、前記セキュアな処理を前記保護情報処理手段に要求し、前記保護情報処理手段は、前記改竄情報が改竄未検査を示す場合、前記保護された情報に対するセキュアな処理の実行を抑止することとしてもよい。
 この構成によれば、前記保護情報処理手段は、改竄情報を参照することにより、プログラムが改竄未検査であるか否かを把握でき、改竄未検査であるプログラムからの要求に対するセキュアな処理の実行を抑止でき、自装置のセキュリティを確保することができる。
 また、前記保護情報処理手段は、前記プログラム監視手段に対し、前記プログラムの改竄検査を要求し、前記プログラム監視手段は、前記改竄情報が改竄未検査を示すよう設定された後、前記要求があったときに、前記プログラムについての前記改竄検査手段を用いた改竄の検査を行うこととしてもよい。
 この構成によれば、前記プログラム監視手段は、前記改竄情報が改竄未検査を示すよう設定された後、前記保護情報処理手段により保護情報処理が行われる前に必ず改竄検査をするので、改竄未検査であるプログラムにより保護情報処理の結果が用いられるのを防ぐことができ、自装置のセキュリティを確保することができる。
 また、前記プログラム実行装置は、さらに、前記保護された情報に関する処理が禁止された通常モードと、前記保護された情報に関する処理が許可され、前記通常モードにおいて動作するプログラムから保護されたセキュアモードとを備えており、前記プログラム監視手段と保護情報処理手段はセキュアモード上で実行されることとしてもよい。
 この構成によれば、前記プログラム監視手段と前記保護情報処理手段を、LSI内のオンチップメモリ等、一般的に高価なリソースを用いるセキュアモードで動作させ、前記プログラム、前記改竄検査手段は通常モードで動作させるので、プログラムや改竄検出手段についてもセキュアモードで動作させる場合に比べ、コストを低減することができるとともに、セキュアモード上のプログラムの復号や署名検証に多くの時間を費やすことによるプログラム実行装置の全体的な処理性能低下を避けることができる。さらに、全てセキュアモードで動作させるとした場合、ユーザによって自由に作成またはダウンロードできるプログラムについて保護情報処理を一切禁止する必要があるが、本構成ではこれを避けることができ、結果として、プログラム実行装置において拡張性が損なわれるのを避けることができる。
 また、前記プログラム監視手段と前記保護情報処理手段をセキュアモード上で実行することにより、通常モードで動作させる場合に比べ、自装置のセキュリティをより強固にすることができる。
 また、前記プログラム実行装置は、さらに、読み出し専用の記憶領域を備え、前記読み出し専用の記憶領域には、プログラム実行装置の電源が投入されたときに最初に実行されるブートコードが記録されており、前記ブートコードが、前記スケジューリング手段、前記プログラム監視手段及び前記保護情報処理手段の改竄を検出することとしてもよい。
 この構成によれば、改竄されないブートコードにより、前記スケジューリング手段、前記プログラム監視手段及び前記保護情報処理手段の改竄をより確実に検出することができる。
 また、前記プログラムは、実行開始時にCPU使用権の割り当てを待つ実行可能状態となり、実行開始から実行終了までの間、前記実行可能状態と、CPU使用権が割り当てられている実行状態と、プログラムが実行可能となるための条件が揃うのを待つ待ち状態との3つの状態を遷移し、前記プログラム監視手段は、前記スケジューリング手段が前記プログラムを前記待ち状態から前記実行可能状態に遷移させるのを検出し、その後前記プログラムにCPU使用権が割り当てられるまでに前記改竄検査手段に前記プログラムの改竄を検査させることとしてもよい。
 この構成によれば、プログラムの実行終了までの間に、入出力待ちなどの原因によりCPU使用権が剥奪された場合であっても、前記プログラムが前記待ち状態から前記実行可能状態に遷移された場合に改竄検査を行うので、プログラムの改竄をより確実に検出することができる。
 また、前記プログラム監視手段は、前記プログラムが前記待ち状態から前記実行可能状態に遷移する毎に改竄情報を生成し、前記改竄情報が改竄未検査を示すよう設定し、前記プログラムが待ち状態に遷移した場合に前記改竄情報を削除することとしてもよい。
 この構成によれば、前記プログラムが前記実行可能状態及び前記実行状態の場合にのみ改竄情報を記憶するので、使用する記憶領域のサイズを低減できる。
 また、前記プログラム監視手段は、前記プログラムが起動されたときに前記改竄情報を生成し、前記改竄情報が改竄未検査を示すよう設定することとしてもよい。
 この構成によれば、改竄検出の頻度を下げ、プログラム実行装置全体として処理性能の低下を防ぐことができる。
 また、前記プログラム監視手段は、さらに、一定時間毎に前記プログラムの改竄情報を削除することとしてもよい。
 この構成によれば、前記改竄情報についての問い合わせが前記プログラムの終了をまたがっており、プログラム終了からプログラム起動の間に改竄があったとしても、それを検出することができる。
 また、前記スケジューリング手段及び前記改竄検査手段はコンピュータプログラムに従ってCPUが動作することにより実現され、前記スケジューリング手段と、前記改竄検査手段のうち少なくとも1つは主記憶メモリに読み出し専用属性でロードされ常駐することとしてもよい。
 また、前記スケジューリング手段及び前記改竄検査手段はコンピュータプログラムであり、前記スケジューリング手段と、前記改竄検査手段のうち少なくとも1つは主記憶メモリにおけるスワップされない領域にロードされることとしてもよい。
 この構成によれば、前記スケジューリング手段及び前記改竄検査手段のうち少なくとも1つを改竄されることなくセキュアに実行することができる。
 また、前記プログラムには、前記プログラムの識別情報が付随し、前記スケジューリング手段は、実行可能待ち行列を備えており、前記識別情報を前記実行可能待ち行列に加えることによって、前記プログラムをCPU使用権の割り当て待ちにすることとしてもよい。
 この構成によれば、CPU使用権の割り当て待ちを、OSに備わっていることの多い実行可能待ち行列を監視することで容易に検出できる。
 また、前記スケジューリング手段は、プログラムに関する情報を記録するプロセス制御ブロックに、前記プログラムに係る情報を追加することで、前記プログラムをCPU使用権の割り当て待ちにすることとしてもよい。
 この構成によれば、CPU使用権の割り当て待ちを、OSに備わっていることの多いプロセス制御ブロックを監視することで容易に検出できる。
 また、前記プログラムは、自身の改竄検出をプログラム監視手段に依頼し、前記プログラム監視手段は、前記プログラムについての改竄の検査を、前記依頼を受けてから前記セキュアな処理の実行前に行うこととしてもよい。
 この構成によれば、前記改竄検査のタイミングを、さらにプログラム側でも決定することができる。
 また、前記改竄検査手段は、改竄有無の判断に必要な情報を前記プログラム監視手段から参照可能な領域に配置し、前記プログラム監視手段は、前記改竄有無の判断に必要な情報を元に前記プログラムが改竄されたか否かを判断することとしてもよい。
 この構成によれば、前記プログラムが改竄されたか否かの判定結果自体を、前記プログラム監視手段と前記改竄検査手段との間等で受け渡す必要が無いので、前記判定結果を前記プログラム監視手段内に留めるなどセキュアに維持することができる。
 本発明の一実施形態である情報処理方法は、プログラムをセキュアに実行する情報処理方法であって、プログラムをCPU使用権の割り当て待ちにする起動ステップと、前記プログラムがCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに、前記プログラムの改竄を検査するプログラム監視ステップとを含む。
 本発明の一実施形態である情報処理プログラムは、プログラムをセキュアに実行する情報処理プログラムであって、プログラムをCPU使用権の割り当て待ちにする起動ステップと、前記プログラムがCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに、前記プログラムの改竄を検査するプログラム監視ステップとを含む。
 本発明の一実施形態である記録媒体は、プログラムをセキュアに実行する情報処理プログラムを記録している、コンピュータ読み取り可能な記録媒体であって、前記情報処理プログラムは、プログラムをCPU使用権の割り当て待ちにする起動ステップと、前記プログラムがCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに、前記プログラムの改竄を検査するプログラム監視ステップとを含む。
 本発明の一実施形態である集積回路は、プログラムをセキュアに実行する集積回路であって、プログラムをCPU使用権の割り当て待ちにするスケジューリング手段と、前記プログラムの改竄を検査する改竄検査手段と、前記スケジューリング手段を監視し、前記プログラムがCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに前記改竄検査手段を用いて前記プログラムの改竄を検査するプログラム監視手段とを備える。
 この構成によれば、プログラムの実行終了までの間に、入出力待ちなどの原因によりCPU使用権が剥奪された場合であっても、次にCPU使用権の割り当て待ちになりCPU使用権が割り当てられるまでに必ず改竄検査を受けるので、プログラムの改竄をより確実に検出することができる。
 
 以下本発明の実施の形態について、図面を参照しながら説明する。
 1.実施の形態1
 図1は、本発明の一実施の形態に係るプログラム実行装置1の構成を示す図である。
 プログラム実行装置1は、プログラム2をCPU使用権の割り当て待ちにするスケジューリング手段3と、プログラム2の改竄を検査する改竄検査手段4と、プログラム監視手段5とから構成される。プログラム監視手段5は、スケジューリング手段3を監視し、プログラム2がCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに改竄検査手段4を用いてプログラム2の改竄を検査する。
 この構成により、プログラム2にCPU使用権が割り当てられるにあたり、必ず改竄検査を行うことができる。プログラム2の実行中に、入出力待ちなどによりプログラム2が待ち状態へと遷移し、この時にプログラム2がハードディスク等へスワップするような場合がある。そして、スワップしたプログラム2が改竄された場合であっても、スワップしたプログラム2が主記憶メモリにロードされるときにCPU使用権の割り当て待ちになる。しかし、CPU使用権の割り当て待ちになってからCPU使用権が実際に割り当てられるまでに必ず改竄検査がなされるので、プログラム2について成された改竄を検出することができる。
 2.実施の形態2
 上述の実施形態におけるプログラム実行装置1についてより具体的に説明する。本実施の形態では、プログラム実行装置1としての改竄検出装置100を例に説明する。
 改竄検出装置100は、CPU(Central Processing Unit)マイクロプロセッサ、ハードディスク、ROM(Read Only Memory)、RAM(Random Access Memory)、フラッシュメモリ等の不揮発メモリ、LSI(Large Scale Integration)、ディスプレイユニット及びキーパッドなどから構成されるコンピュータシステムである。前記ROM又は前記ハードディスクユニットには、コンピュータプログラムが記憶されており、RAM上に読み出されたコンピュータプログラムに従ってCPUが動作することにより、改竄検出装置100はその機能を達成する。LSI内には、特に改竄から保護が必要な情報などを記憶するために、記録内容の改竄が不可能なオンチップメモリ(セキュアメモリ)等を備えている。
 改竄検出装置100は、具体的には、携帯電話機、Android(登録商標)及びiPhone(登録商標)等のような携帯情報端末である。
 また、改竄検出装置100は、テレビ、レコーダ、プレーヤー等のAV機器、デジタルカメラ、FAX等の通信機器といった情報処理装置である。
 図2は、本実施の形態における改竄検出装置100のプログラム構成図である。
 改竄検出装置100は、プログラムを改竄等から保護してセキュアに動作させるセキュアモードと、セキュアに動作させる必要のないプログラムを動作させる通常モードの2モードを備える。セキュアモードで動作するプログラムは、セキュアメモリに配置されるため信頼性が高く、通常モードで動作するプログラムには許可されない、保護された情報に関する処理が許可される。また、セキュアモードで動作するプログラムは、ある秘密鍵によって暗号化や署名付与等がなされており、特定の開発者のみ作成が許可されている。
 改竄検出装置100は、図2に示すように、通常モードで動作するブートコード101、OS(Operating System)102、保護情報処理受付手段103、ユーザプログラム104・・・などユーザプログラム及び改竄検出手段105並びにセキュアモードで動作するセキュアOS110、保護情報処理手段111及び起動プログラム監視手段112を含む。改竄検出手段105は、上述の改竄検査手段4に対応し、起動プログラム監視手段112が上述のプログラム監視手段5に対応する。また、ユーザプログラム104・・・が上述のプログラム2に対応する。
 改竄検出状態114は、セキュアメモリに記録される情報であり、各プログラムについての改竄状態(改竄未チェック、改竄有及び改竄無の別)を示す。改竄検出状態114は、ブートコード101及びセキュアモード上のプログラムからのみ書き換え可能であり、プログラムの起動可否の判定に用いられる。
 図3は、改竄検出状態114の一例を示す図である。
 改竄検出情報114は、具体的には、プログラムに係るプロセス毎の識別子であるPIDと、そのプログラムの改竄状態の組のリストである。例えば、図3の場合、PIDが102であるプログラムの改竄状態は、改竄無である。
 ブートコード101は、改竄検出装置100の電源がONされたとき最初に実行されるプログラムであり、書き換え不可能なROM領域に記録されている。ブートコード101は、信頼を要するプログラムであるOS102、改竄検出手段105、セキュアOS110、保護情報処理手段111及び起動プログラム監視手段112等の改竄を検査する。改竄が検出された場合、改竄検出装置100の起動を停止又は機能制限するなど必要な処理を行う。改竄が検出されなかった場合、ブートコード101は、改竄検出状態114に、OSの改竄状態として「改竄無」と記録し、OS102を起動する。ここで、ブートコード101は、書き換え不可能な信頼性の高いプログラムであるので、改竄検出状態114を例外的に書き換え可能としている。
 OS102は、オペレーティングシステムであり、改竄検出手段105を起動し、ユーザプログラム104を起動する。ここでは、OS102は、一例としてLinux(登録商標)とするが、同様な機能を有する他のOSでもよい。OS102は、プログラム起動手段121、起動プログラム情報記録手段122、プログラム実行手段123及びファイルシステム124を含む。
 プログラム起動手段121は、他のプログラム等からあるプログラムの起動要求を受け付けて、プログラム情報を生成及び初期化し、起動プログラム情報記録手段122に通知する。本実施の形態では、プログラム情報は、後述する実行可能待ち行列に登録されるプログラムの識別子(PID)を含む。プログラム起動手段121は、一例としてforkシステムコールとするが、他のプログラム等でもよい。
 起動プログラム情報記録手段122は、プログラム起動手段121から通知されたプログラム情報を記録する。また、OS102等の信頼できる特定のプログラムからプログラム情報の変更要求を受け、変更要求に従ってプログラム情報を変更し、削除要求を受け、削除する。
 プログラム実行手段123は、起動プログラム情報記録手段122に記録されたプログラム情報に従ってプログラムを実行する。プログラム実行手段123の一例には、CPUスケジューリングを実施するCPUスケジューラや、現在実行中のプロセスをプロセス制御ブロックに退避し、次に実行するプロセスのプロセス制御ブロックに従ってその実行するプロセスにCPUを割り当てるディスパッチャ等がある。プログラム実行手段123は、上述のスケジューリング手段3に対応する。
 図4は、改竄検出装置100において実行されるユーザプログラムの状態遷移図である。
 ユーザプログラムは、実行可能状態401、実行状態402及び待ち状態403の3つの状態を取り得る。ユーザプログラムは、プログラム起動手段121により起動されたときに、まず実行可能状態401に設定される。実行可能状態401は、CPUが割り当てられれば実行可能であることを表す状態である。ここで、プログラム実行手段122によってCPUが割り当てられると、プログラムが実際に実行されている状態である実行状態402に遷移する。そして、実行状態402において、プログラムに割り当てられたCPUを使用できる時間を使い果たしたときや、より優先度の高い他のプログラムが実行可能状態401になったとき等に、実行可能状態401に遷移する。また、実行状態402のプログラムは、ファイルアクセス等の入出力待ちが発生したとき、他のプログラムと同期を取るため等によりイベント待ちが発生したとき、プログラム自身がスリープしCPU割り当てを放棄したとき等に、待ち状態403に遷移する。待ち状態403のプログラムは、プログラムが待っている入出力完了やイベント等が発生した場合に、待ち状態403から実行可能状態401に遷移する。待ち状態403のプログラムは、実行可能状態401に遷移するまでCPUが割り当てられることはない。
 プログラムが、実行可能状態401、実行状態402及び待ち状態403の3つのうちいずれの状態であるかはプロセス制御ブロックに記録される。OS102がLinuxである場合、プロセス制御ブロックはtask_struct構造体等で表現される。
 図5は、プログラム毎のプロセス制御ブロックを記録するプロセス制御ブロックDB500の一例を表す図である。
 プロセス制御ブロックDB500の各行(プロセス制御ブロック)が1つのプログラムに対応しており、プロセス制御ブロックは、プログラムID501、CPU退避情報502、状態503、優先度504、CPU残り時間505及び資源情報506を含んで構成される。なお、本実施の形態では、1個のプロセスに係る情報をプロセス制御ブロックと称しているが、一般的に、本実施の形態におけるプロセス制御ブロックDB500相当の情報をプロセス制御ブロックと称する場合もある。
 プログラムID501は、プログラム毎に割り当てられる固有の識別子であり、プログラムを識別するために使用される。
 状態503は、プログラムが上述の状態遷移に係る実行可能状態401、実行状態402及び待ち状態403のいずれであるかを示す。本実施の形態では、実行可能状態401と実行状態402を区別せずに「実行可能」と表現しており、状態503は、「実行可能」「待ち状態」のいずれかが設定される。なお、状態503において、実行可能状態401と実行状態402とを区別して表現してもよい。
 CPU退避情報502は、実行状態402のプログラムが他の状態に遷移する際、遷移前の状態から処理を再開するために用いられる情報であり、遷移時のCPUレジスタの内容等が保存される。
 優先度504は、プログラムを実行する場合の優先度を示し、具体的には、「高」「中」「低」のいずれかが設定される。優先度504は、プログラム実行手段122が実行可能待ち行列から次に実行するプログラムを決定する際に使用され、優先度が「高」のものを始めとして「中」「低」の順に選択される。優先度504は、プログラム毎に固定ではなく、プログラムの性質や状況等に応じてOS102により変更される。
 CPU残り時間505は、プログラムがCPUに割り当てられ実行される残り時間を示す。CPU残り時間505には、実行状態402に移行しCPUが割り当てられる際に初期値として所定時間が設定される。そして、プログラムがCPUを使用している間、その使用した時間分だけCPU残り時間505が減算されていく。CPU残り時間505の値が0になったときにプログラムは実行状態402から実行可能状態401に遷移し、後述する実行可能待ち行列の該当する優先度付きキューの後尾に追加される。このとき、後述するCPU残り時間505を使い切ったプログラム用の有効期限切れ実行可能待ち行列に登録されることとしてもよい。
 資源情報506は、プログラムが使用しているメモリやファイル等の資源を表す情報であり、これら資源の参照時や、プログラム終了時に資源を解放する際などに使用される。資源情報506は、具体的には、プログラムの実体やデータ、スタック等が配置されているアドレス、オープン中であるファイルのファイルディスクリプタなどを含む。
 各プロセス制御ブロックは、親プログラムIDやグループID等の情報をも含むが、本発明の実施形態の説明に関連しない事項なので説明は省略する。
 実行可能待ち行列600は、実行可能状態401のプログラムのPIDが優先度毎に設けられたキューに先入れ先出し方式でキューイングされる。OS102がLinuxである場合、実行可能待ち行列はRUNキューと呼ばれるデータ構造で表現される。
 図6は、実行可能待ち行列600の一例を表す模式図である。
 実行可能待ち行列600は、優先度504が「高」であるプログラムに対応する高優先度キュー601、優先度504が「中」のプログラムに対応する中優先度キュー602、及び優先度504が「低」のプログラムに対応する低優先度キュー603から構成される。各キューは図面に向かって右端が先頭、左端が後尾を表し、同一のキューに記録されているプログラムは、キューの先頭に記録されたPIDに係るプログラムから順にCPUが割り当てられ実行される。また、異なる優先度のキューにPIDが記録されている場合、優先度の高いキューにPIDが記録されているプログラムから先にCPUが割り当てられて実行される。
 プログラムが、図4における待ち状態403から実行可能状態401になった場合に、そのプログラムの優先度に応じたキューにそのプログラムのPIDがキューイングされる。プログラムが待ち状態403になった場合に、実行可能待ち行列600からPIDが削除され、次にキューの先頭となるPIDに係るプログラムが実行状態402になる。
 また、プログラムが実行状態402から実行可能状態401になった場合には、そのプログラムのPIDは、キューイングされていた実行可能待ち行列600から削除されて、その実行可能待ち行列600の最後尾に記録される。
 図7は、プログラム実行手段122が、プログラムへのCPUの割り当てを変更する処理の手順を示すフローチャートである。ここでは、説明の便宜上、あるプログラムにCPUが割り当てられている状態から開始する。この状態において、プログラム実行手段122は、現在CPUが割り当てられているプログラムが実行状態402から実行可能状態401あるいは待ち状態403に遷移するのを待つ(S1)。実行可能状態或いは待ち状態に遷移する場合には、遷移するプログラムのCPUレジスタの内容等をプロセス制御ブロック500のCPU退避情報502に退避する(S2)。そして、プログラム実行手段122は、実行可能待ち行列600のいずれかの優先度付きキューにPIDが記録されているか否か判定し(S3)、記録されていない場合(S3:Y)にはPIDが追加されるのを待つ。PIDが記録されている場合、プログラム実行手段122は、高優先度キュー601が空でなければ(S4:N)、高優先度キュー601の先頭の要素(PID)を取得し、取得した要素をキューから削除する(S5)。高優先度キュー601が空の場合(S4:Y)、プログラム実行手段122は、中優先度キュー602が空でなければ(S6:N)、中優先度キュー602の先頭の要素を取得し、取得した要素をキューから削除する(S7)。中優先度キュー602が空の場合(S6:Y)、低優先度キュー603の先頭の要素を取得し、当該要素をキューから削除する(S8)。S9において、プログラム実行手段122は、S5、S7、S8のいずれかにおいて取得した要素に係るプログラムに対し、プロセス制御ブロック500のCPU退避情報502等に従いCPUを割り当てる。図6の場合であれば、高優先度キュー601の先頭に登録されているプログラムIDが100の要素604が選択される。その後、プログラムIDが「103」「101」「104」「102」のプログラムの順に選択され、実行されていく。以上のように、プログラムがCPUの割り当てを受けて実行するためには、必ず実行可能待ち行列600のいずれかの優先度付きキューに追加される必要がある。
 なお、ここでは実行可能待ち行列600の一例として優先度付きキューを挙げたが、単一のキューや他のデータ構造、アルゴリズムであっても構わない。
 なお、ここでは実行可能待ち行列600が一組である例を示したが、例えばアクティブな実行待ち行列と有効期限切れ実行待ち行列とを用い、CPU残り時間505を使い切ったプログラムは有効期限切れ実行待ち行列に登録され、アクティブな実行待ち行列が空になった場合、アクティブな実行待ち行列と有効期限切れ実行待ち行列を入れ替えることとしてもよい。こうすることで、低優先度のプログラムにも必ずCPUが割り当てられることを保証し得る構成とすることができる。
 また、本実施の形態では、プログラム情報を実行可能待ち行列におけるPIDとしたが、プログラムが実行されるタイミングを把握できる情報であればよく、例えば、プロセス制御ブロック等を用いてもよい。
 保護情報処理受付手段103は、通常モードとセキュアモードの切替を行い、保護情報処理手段111に対する処理の要求をユーザプログラム104等から受け付け、受け付けた処理をセキュアOS110に依頼する。
 セキュアOS110は、セキュアモードで動作するオペレーティングシステムである。セキュアOS110は、保護情報処理受付手段103から保護情報処理手段111に対する処理要求を受け取り、保護情報処理手段111を呼び出す。処理要求には、要求元のプログラムを識別するIDが含まれるものとする。
 保護情報処理手段111は、セキュアOS110を介してユーザプログラム104などからの保護情報処理の要求を受け取ると、改竄検出状態114に記録されている要求元のPIDにより識別される改竄状態を確認し、改竄状態が改竄無を示す場合に保護情報処理を実行する。保護情報処理とは、例えば、鍵設定や権利情報操作、個人情報処理等である。そして、保護情報処理の実行結果を、要求元のプログラムにセキュアOS110、保護情報処理受付手段103を介して通知する。
 起動プログラム監視手段112は、起動プログラム情報記録手段122に記録されたプログラム情報を監視し、また、改竄検出状態114を管理する。とりわけ、CPUの割り当てに必要な実行可能待ち行列を監視し、CPUが割り当てられるプログラムについて必ず改竄検出済みか否かを判定することになるため、改竄検出装置100で動作するプログラムの改竄をより確実に検出することができる。
 ここで、改竄検出状態114について補足説明する。改竄検出状態114においては、実行可能待ち行列600に登録されたプログラム毎に改竄情報を保持している。各プログラムが実行可能待ち行列600に追加された際、起動プログラム監視手段112により改竄未チェックとした改竄情報が保持される。その後、改竄検出手段105により改竄が検出されなかったプログラムは、改竄情報が改竄無と更新され、改竄が検出されたプログラムは改竄情報が改竄有と更新される。また、実行可能待ち行列600からプログラムに係るPIDが削除されたとき、又はプログラムが終了しOS102等からの要請に応じ起動プログラム情報記録手段122によりプロセス制御ブロック500からプログラム情報が削除されたとき、改竄情報は、起動プログラム監視手段112により削除される。
 なお、プログラム毎の改竄情報を改竄検出状態114から削除するタイミングについて、当該プログラムが実行可能待ち行列600から削除されたときとすると、プログラムが待ち状態403になる度に当該プログラムの改竄検出を行う必要があるため、改竄検出装置300の応答性は悪化するが、一方でセキュリティ強度を上げることができる。例えば、改竄チェック済み状態のあるプログラムが、メモリからハードディスク等にスワップアウトされ、スワップアウト先で改竄された場合、一般にスワッピングスケジューリングよりもCPUスケジューリングの方が周期が短いため、スワップアウト先での改竄を検出できるようになる。
 次に、改竄検出装置100の起動から保護情報処理を行うまでの処理の流れについて図8、9、10を用いて説明する。
 まず、改竄検出装置100に電源が投入されると、ブートコード101が起動し、OS102、保護情報処理受付手段103及び改竄検出手段105の改竄を検出する(S21)。改竄が検出された場合には(S22:Y)、改竄検出装置100における改竄によりセキュリティが脅かされる処理を停止したり、改竄から復旧する処理以外の処理を終了するなどにより改竄への対応を行う。
 改竄が検出されなかった場合(S22:N)、ブートコード101は、OS102、保護情報処理受付手段103を起動し(S23)、ブートコード101は処理を終了する(S24)。
 次に、OS102が、ユーザプログラム104などユーザプログラムを起動する(S25)。そして、ユーザプログラム104が実行可能待ち行列に追加されるまで待つ(S26:N)。このとき、保護情報処理を必要としないユーザプログラム等は、並行して実行されるものとする。ユーザプログラム104が実行可能待ち行列に追加された場合(S26:Y)、保護情報処理受付手段103がセキュアモードへの切り替えを行い(S27)、起動プログラム監視手段112が、ユーザプログラム104のPIDと、「改竄未チェック」を示す改竄状態とを改竄検出状態114に記録する(S28)。
 そして、起動プログラム監視手段112は、保護情報処理受付手段103を用いて通常モードへの切り替えを行う(S29)。
 次に、ユーザプログラム104により保護情報処理受付手段103に保護情報処理が依頼されるか(S30)、ユーザプログラムのPIDが実行可能待ち行列から削除される(S41)のを待つ(S30:N及びS41:N)。
 ユーザプログラムのPIDが実行可能待ち行列から削除された場合(S41:Y)、そのプログラムの改竄状態を削除し(S42)、S26に移行する。
 ユーザプログラム104により保護情報処理受付手段103に保護情報処理が依頼された場合(S30:Y)、保護情報処理受付手段103がセキュアモードへ切り替える(S44)。そして、保護情報処理手段111は、保護情報処理を依頼したユーザプログラム104び改竄情報を起動プログラム監視手段112に問い合わせる(S45)。起動プログラム監視手段112は、保護情報処理手段111から問い合わせのあったユーザプログラム104の改竄検出状態114における改竄情報を確認し(S46)、改竄未チェックであれば(S47:Y)、改竄検出手段105へのユーザプログラム104に係る改竄検出情報の要求を、セキュアOS110を介し、保護情報処理受付手段103に通知する(S48)。保護情報処理受付手段103は、通常モードへの切り替えを行う(S49)。
 改竄検出手段105は、ユーザプログラム104が改竄されているかどうかを判断するのに必要な改竄検出情報を生成し、保護情報処理受付手段103に通知する(S61)。改竄検出情報は、一例として、不揮発メモリ106に記録されたユーザプログラム104の実行コードを入力とし、既定のハッシュ値計算や暗号化、署名計算等を行った結果とする。
 保護情報処理受付手段103は、セキュアモードへの切り替えを行う(S62)。
 次に、起動プログラム監視手段112は、改竄検出情報を受け取り、予め信頼性の高い環境にて生成された期待値と一致するかどうかにより改竄有無を判断し(S63)、判断結果(改竄有/改竄無)を改竄検出状態114における改竄情報に反映し(S64)、保護情報処理手段111に通知する。なお、改竄検出は他の方法で行ってもよい。例えば不揮発メモリ106上ではなく、RAM上に展開されたプログラムの実行コードを入力としてもよい。また、ハッシュ値等は用いず、プログラムが正規の作成者によるものであることを確認するために既定のパスワード等による認証方法を用いてもよい。
 保護情報処理手段111は、受け取った改竄検出状態114における改竄情報が改竄無を示す場合のみ(S65:Y)、ユーザプログラム104から依頼のあった保護情報処理を実行する(S66)。そして、保護情報処理の実行結果をユーザプログラム104に通知するよう保護情報処理受付手段103に要求する(S67)。
 また、S65において、保護情報処理手段111は、受け取った改竄検出状態114における改竄情報が改竄有を示す場合(S65:N)、保護情報処理の実行が不可である旨をユーザプログラム104に通知するよう保護情報処理受付手段103に要求する(S68)。
 保護情報処理受付手段103は、通常モードへの切り替えを行い(S69)、通知要求された情報をユーザプログラム104に通知し(S70)、S30に移行する。
 また、上述のS47において、改竄情報が改竄未チェックで無いと判定した場合(S47:N)、S48~S64は行わず、S65に移行する。
 以上で、改竄検出装置100の起動から保護情報処理を行うまでの処理の流れについての説明を終える。
 以上のように、本発明の改竄検出装置100は、ユーザプログラム104の起動時にプログラムの改竄検出状態114に係る改竄情報を、改竄未チェックを示すよう設定する。その後の改竄検出処理においてユーザプログラム104の改竄が検出されなかった場合には、ユーザプログラム104の改竄検出状態114に係る改竄情報を改竄無とし、改竄が検出された場合には、改竄情報を改竄有とする。改竄無を示す場合のみユーザプログラム104に対して保護情報処理を許可し、ユーザプログラム104の終了時にプログラムの改竄情報を改竄検出状態114から削除する。これにより、ユーザプログラム104の起動前、及び起動してから実行までの間に改竄されたプログラムについて、その改竄をより確実に検出することができる。特に、プログラムがCPUの割り当てを受けて実行するためには、必ず実行可能待ち行列600のいずれかの優先度付きキューに追加される必要があるため、実行可能待ち行列600を監視することで、改竄検出装置100で実行され保護情報処理を必要とするプログラムについて、より確実に改竄検出処理が行われていることを保証できることとなる。
 また、プログラムや改竄検出手段105を通常モード101で動作させることとしているため、改竄検出装置100のリソース増大や処理性能低下、拡張性の損失を招くことなく、プログラムの改竄をより確実に検出できる。
 3.変形例その他
 以上、本発明の実施の形態を説明したが、本発明はこれらに限定されるものではない。以下にその他の変形例について説明する。
 (1)上述の実施の形態では、ユーザプログラム104についての改竄の有無の検出は、ユーザプログラム104が保護情報処理手段111に対し保護情報処理の要求を行うことをトリガにして行っていたが、これに限らず、保護情報処理を実行するときに改竄有無の検出が行われていればよい。改竄検出情報の作成を開始するトリガはいろいろ想定される。
 例えば、ユーザプログラム104に係るPIDが、実行可能待ち行列に登録されると起動プログラム監視手段112は改竄情報として「改竄未チェック」を登録するが、登録と同時に、保護情報処理の要求を待たずに、改竄検出手段105に対して改竄検出情報を要求してもよい。
 このようにすれば、改竄検出手段108における改竄検出情報の作成に時間がかかるような場合、保護情報処理が要求されるのに先立って改竄検出情報を作成しておくことができる。したがって、ユーザプログラム104が、保護情報処理を要求した場合に、保護情報処理の開始にあたり、改竄検出情報が作成される時間分待たされるようなことなく、迅速に保護情報処理を行うことができる。
 また、ユーザプログラム104が、起動プログラム監視手段112に対し、保護情報処理を要求するより前のタイミングで、改竄情報の生成要求を行ってもよい。この場合でも、保護情報処理が要求されるのに先立って改竄検出情報を作成しておくことができる。
 (2)上述の実施の形態では、起動プログラム情報記録手段122を通常モードで動作するものとしていたがこれに限らない。図11に示すように、起動プログラム情報記録手段122をセキュアモードで動作するものとしてもよい。この場合において、OS102、プログラム起動手段121、プログラム実行手段122等がプログラム情報を変更させるときには、保護情報処理受付手段103及びセキュアOS110を通じてセキュアモード上の起動プログラム情報記録手段122にプログラム情報の変更を依頼することとなる。
 このようにすれば、想定しない不正なプログラムからプログラム情報を不正に書き換えられてしまうのを阻止することができ、よりセキュリティ強度を向上することができる。
 (3)上述の実施の形態では、改竄検出装置100が、通常モードとセキュアモードを切り替えながら動作する例で説明したが、これに限らない。改竄検出装置100において、通常モードとセキュアモードが並行して動作する構成であってもよい。この場合、セキュア処理と通常モードとの切り替え毎に発生する切り替えのためのオーバーヘッドを無くすことができる。また、起動プログラム監視手段112によりプログラム情報の追加、削除等を常に監視させることができる。
 (4)上述の実施の形態では、改竄検出装置100は、単一のCPUを備えていたが、複数のCPUを備える構成であってもよい。この場合、CPU毎に実行可能待ち行列600が存在することになるが、起動プログラム監視手段はすべての実行可能待ち行列を監視することになる。
 (5)上述の実施の形態では、改竄検出手段105は改竄検出装置100の電源がONされたときに、ブートコード101により改竄検出されることとしたが、その後、改竄検出手段105はメモリ上に常駐することとしてもよい。
 この場合、改竄検出手段105についての改竄検出処理が終了し、メモリに常駐した後、不揮発メモリに記録された改竄検出手段105のプログラムが改竄されたとしても、改竄される前の常駐している改竄検出手段によって正しい改竄検出処理が実行されるので、改竄検出手段への改竄の影響を改竄検出処理に与えないようにできる。
 さらに、改竄検出手段105は、OS102によりスワップされない領域に展開され実行されることとしてもよい。これにより、改竄検出手段105がスワップファイル上で改竄されることを防ぐことができる。また、改竄検出手段105に限らず、起動プログラム情報記録手段122やプログラム起動手段121、プログラム実行手段123、保護情報処理受付手段103等、セキュリティ上重要な構成物はスワップされない領域に展開され実行されることとしてもよい。
 (6)上述の実施の形態では、起動プログラム監視手段112によりプログラム情報を常に監視することとしたが、保護情報処理手段111または保護情報処理を必要とするユーザプログラム104から起動プログラム監視手段112に対して改竄検出状態114の問い合わせがあった際にプログラム情報を確認し、プログラムの改竄検出状態を追加及び削除することとしてもよい。これにより、起動プログラム監視手段112のプログラムサイズを抑えることができ、改竄検出装置100のリソース増大や処理性能低下、拡張性の損失をより抑えることができる。
 (7)改竄検出状態114における改竄情報の削除を一定時間毎に行うこととしてもよい。これにより、起動プログラム監視手段112が、改竄検出状態114に係るプログラム情報を確認する場合、改竄検出状態114の問い合わせがプログラムの終了をまたがっており、プログラム終了からプログラム起動の間にプログラムが改竄されていたとしても、それを検出することができる。
 (8)上述の実施の形態では、改竄検出情報の作成を改竄検出手段105で行うこととしたが、これに限らない。例えば、改竄検出手段105が、改竄検出情報の作成に必要な情報を起動プログラム監視手段112から参照可能な領域に配置して、起動プログラム監視手段112が、その必要な情報を用いて改竄検出情報の作成を実施することとしてもよい。これにより、改竄検出情報自体の改竄を防ぐことができる。
 (9)上述の実施の形態では、実行可能待ち行列600にプログラムが追加された際、その追加されたプログラムの改竄検出状態114に係る改竄情報を改竄未チェックとして保持することとしたが、実行可能待ち行列600とプロセス制御ブロック500の実体を同じものとする場合は、プロセス制御ブロック500を参照することとしてもよい。
 また、プログラムが実行可能待ち行列600から削除される度に、そのプログラムの改竄検出状態114から改竄情報を削除することとしたが、前述のようにプログラムが終了し、OS102等からの要請に応じプロセス制御ブロックDB500からプロセス制御情報が削除されたときに、そのプログラムの改竄情報を改竄検出状態114から削除することとしてもよい。
 (10)上述の実施の形態では、特に説明しなかったが、改竄検出装置が、OS、ユーザプログラム等プログラムをメモリにロードする場合には、読み出し専用属性でロードするとしてもよい。また、ロードされたプログラムの一部又は全部は、メモリに常駐することとしてもよい。
 特に、プログラム起動手段121、起動プログラム情報記録手段122、プログラム実行手段123及びファイルシステム124を含むOSや、改竄検出手段105については、情報処理効率、セキュリティの観点等から、メモリ上に読み出し専用属性でロードされ、メモリに常駐する方が望ましい。
 読み取り専用属性の設定は、メモリ等のハードウェアがプログラムを読み取り専用属性でロードする機能を有し、ハードウェア的に行われているものとしてもよいし、ブートコード101、OS102等のシステムに係るソフトウェアが、メモリ上のプログラムが書き換えられないよう、ソフトウェア的にアクセス制御することとしてもよい。
 (11)本願発明は、以下に説明するステップを含む情報処理方法又は情報処理プログラムとしてもよい。図12は、本発明の一実施の形態に係るプログラム実行装置に適用される情報処理方法、情報処理プログラムに係る処理を示す図である。まず、起動ステップ(S101)において、プログラムをCPU使用権の割り当て待ちにする。次に、プログラム監視ステップ(S102)において、プログラムがCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに、プログラムの改竄を検査する。
 本発明に係るプログラム実行装置、プログラム実行方法、プログラム、記録媒体及び集積回路は、映画や音楽、個人情報等、不正なアクセスからの保護が必要な情報を取り扱う携帯電話機、携帯情報端末等に用いるのに好適であり、これら端末等を取り扱う企業等により、生産され、譲渡等される。
 1 プログラム実行装置
 2 プログラム
 3 起動手段
 4 改竄検査手段
 5 プログラム監視手段
 100 改竄検出装置
 101 ブートコード
 102 OS
 103 保護情報処理受付手段
 104 ユーザプログラム
 105 改竄検出手段
 110 セキュアOS
 111 保護情報処理手段
 112 起動プログラム監視手段
 114 改竄検出状態
 121 プログラム起動手段
 122 起動プログラム情報記録手段
 123 プログラム実行手段
 124 ファイルシステム

Claims (21)

  1.  プログラムをセキュアに実行するプログラム実行装置であって、
     プログラムをCPU使用権の割り当て待ちにするスケジューリング手段と、
     前記プログラムの改竄を検査する改竄検査手段と、
     前記プログラムがCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに前記改竄検査手段に前記プログラムの改竄を検査させるプログラム監視手段と
     を備えることを特徴とするプログラム実行装置。
  2.  前記プログラム監視手段は、前記プログラムの改竄状態を示す改竄情報を保持しており、前記プログラムがCPU使用権の割り当て待ちになったときに、前記改竄情報が改竄未検査を示すよう設定し、前記プログラムの改竄を検査したときに、前記改竄情報が改竄検査済みを示すよう設定する
     ことを特徴とする請求項1記載のプログラム実行装置。
  3.  前記プログラム監視手段は、前記改竄情報に、前記改竄検出手段による改竄検査結果である改竄有無を設定することによって前記改竄情報が改竄検査済みを示すよう設定し、
     前記プログラム実行装置は、前記改竄情報が改竄無を示す場合に前記プログラムを実行する
     ことを特徴とする請求項2記載のプログラム実行装置。
  4.  前記プログラム実行装置は、さらに、
     保護された情報をセキュアに処理する保護情報処理手段を備えており、
     前記プログラムは、前記セキュアな処理を前記保護情報処理手段に要求し、
     前記保護情報処理手段は、前記改竄情報が改竄未検査を示す場合、前記保護された情報に対するセキュアな処理の実行を抑止する
     ことを特徴とする請求項3記載のプログラム実行装置。
  5.  前記保護情報処理手段は、前記プログラム監視手段に対し、前記プログラムの改竄検査を要求し、
     前記プログラム監視手段は、前記改竄情報が改竄未検査を示すよう設定された後、前記要求があったときに、前記プログラムについての前記改竄検査手段を用いた改竄の検査を行う
     ことを特徴とする請求項4記載のプログラム実行装置。
  6.  前記プログラム実行装置は、さらに、前記保護された情報に関する処理が禁止された通常モードと、前記保護された情報に関する処理が許可され、前記通常モードにおいて動作するプログラムから保護されたセキュアモードとを備えており、
     前記プログラム監視手段と保護情報処理手段はセキュアモード上で実行される
     ことを特徴とする請求項4記載のプログラム実行装置。
  7.  前記プログラム実行装置は、さらに、読み出し専用の記憶領域を備え、
     前記読み出し専用の記憶領域には、プログラム実行装置の電源が投入されたときに最初に実行されるブートコードが記録されており、
     前記ブートコードが、前記スケジューリング手段、前記プログラム監視手段及び前記保護情報処理手段の改竄を検出する
     ことを特徴とする請求項6記載のプログラム実行装置。
  8.  前記プログラムは、実行開始時にCPU使用権の割り当てを待つ実行可能状態となり、実行開始から実行終了までの間、前記実行可能状態と、CPU使用権が割り当てられている実行状態と、プログラムが実行可能となるための条件が揃うのを待つ待ち状態との3つの状態を遷移し、
     前記プログラム監視手段は、前記スケジューリング手段が前記プログラムを前記待ち状態から前記実行可能状態に遷移させるのを検出し、その後前記プログラムにCPU使用権が割り当てられるまでに前記改竄検査手段に前記プログラムの改竄を検査させる
     ことを特徴とする請求項1記載のプログラム実行装置。
  9.  前記プログラム監視手段は、前記プログラムが前記待ち状態から前記実行可能状態に遷移する毎に改竄情報を生成し、前記改竄情報が改竄未検査を示すよう設定し、前記プログラムが待ち状態に遷移した場合に前記改竄情報を削除する
     ことを特徴とする請求項8記載のプログラム実行装置。
  10.  前記プログラム監視手段は、前記プログラムが起動されたときに前記改竄情報を生成し、前記改竄情報が改竄未検査を示すよう設定する
     ことを特徴とする請求項9記載のプログラム実行装置。
  11.  前記プログラム監視手段は、さらに、一定時間毎に前記プログラムの改竄情報を削除する
     ことを特徴とする請求項4記載のプログラム実行装置。
  12.  前記スケジューリング手段及び前記改竄検査手段はコンピュータプログラムに従ってCPUが動作することにより実現され、前記スケジューリング手段と、前記改竄検査手段のうち少なくとも1つは主記憶メモリに読み出し専用属性でロードされ常駐する
     ことを特徴とする請求項1に記載のプログラム実行装置。
  13.  前記スケジューリング手段及び前記改竄検査手段はコンピュータプログラムであり、前記スケジューリング手段と、前記改竄検査手段のうち少なくとも1つは主記憶メモリにおけるスワップされない領域にロードされる
     ことを特徴とする請求項1に記載のプログラム実行装置。
  14.  前記プログラムには、前記プログラムの識別情報が付随し、
     前記スケジューリング手段は、実行可能待ち行列を備えており、前記識別情報を前記実行可能待ち行列に加えることによって、前記プログラムをCPU使用権の割り当て待ちにする
     ことを特徴とする請求項1記載のプログラム実行装置。
  15.  前記スケジューリング手段は、プログラムに関する情報を記録するプロセス制御ブロックに、前記プログラムに係る情報を追加することで、前記プログラムをCPU使用権の割り当て待ちにする
     ことを特徴とする請求項1記載のプログラム実行装置。
  16.  前記プログラムは、自身の改竄検出をプログラム監視手段に依頼し、
     前記プログラム監視手段は、前記プログラムについての改竄の検査を、前記依頼を受けてから前記セキュアな処理の実行前に行う
     ことを特徴とする請求項4記載のプログラム実行装置。
  17.  前記改竄検査手段は、改竄有無の判断に必要な情報を前記プログラム監視手段から参照可能な領域に配置し、
     前記プログラム監視手段は、前記改竄有無の判断に必要な情報を元に前記プログラムが改竄されたか否かを判断する
     ことを特徴とする請求項1に記載のプログラム実行装置。
  18.  プログラムをセキュアに実行する情報処理方法であって、
     プログラムをCPU使用権の割り当て待ちにする起動ステップと、
     前記プログラムがCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに、前記プログラムの改竄を検査するプログラム監視ステップと
     を含むことを特徴とする情報処理方法。
  19.  プログラムをセキュアに実行する情報処理プログラムであって、
     プログラムをCPU使用権の割り当て待ちにする起動ステップと、
     前記プログラムがCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに、前記プログラムの改竄を検査するプログラム監視ステップと
     を含むことを特徴とする情報処理プログラム。
  20.  プログラムをセキュアに実行する情報処理プログラムを記録している、コンピュータ読み取り可能な記録媒体であって、
     前記情報処理プログラムは、
     プログラムをCPU使用権の割り当て待ちにする起動ステップと、
     前記プログラムがCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに、前記プログラムの改竄を検査するプログラム監視ステップと
     を含むことを特徴とする記録媒体。
  21.  プログラムをセキュアに実行する集積回路であって、
     プログラムをCPU使用権の割り当て待ちにするスケジューリング手段と、
     前記プログラムの改竄を検査する改竄検査手段と、
     前記スケジューリング手段を監視し、前記プログラムがCPU使用権の割り当て待ちになってからCPU使用権が割り当てられるまでに前記改竄検査手段を用いて前記プログラムの改竄を検査するプログラム監視手段と
     を備えることを特徴とする集積回路。
PCT/JP2011/000900 2010-03-19 2011-02-18 プログラム実行装置、情報処理方法、情報処理プログラム、記録媒体及び集積回路 WO2011114621A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010-063932 2010-03-19
JP2010063932 2010-03-19

Publications (1)

Publication Number Publication Date
WO2011114621A1 true WO2011114621A1 (ja) 2011-09-22

Family

ID=44648737

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/000900 WO2011114621A1 (ja) 2010-03-19 2011-02-18 プログラム実行装置、情報処理方法、情報処理プログラム、記録媒体及び集積回路

Country Status (1)

Country Link
WO (1) WO2011114621A1 (ja)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10333902A (ja) * 1997-05-27 1998-12-18 N Ii C Joho Syst:Kk 改ざん検知機能付きコンピュータシステム
JP2004259130A (ja) * 2003-02-27 2004-09-16 Fujitsu Ltd 改ざん検証装置および改ざん検証プログラム
JP2005522802A (ja) * 2002-04-16 2005-07-28 ソニー・コンピュータ・エンタテインメント・アメリカ・インク 改竄防止ハードウェアを使用してコピー保護およびオンラインセキュリティを提供するための方法ならびにシステム
JP2006018684A (ja) * 2004-07-02 2006-01-19 Ntt Docomo Inc タスク管理システム
JP2006106956A (ja) * 2004-10-01 2006-04-20 Fujitsu Ltd ソフトウェアの改竄検出装置及び改竄検出方法
JP2006221631A (ja) * 2005-02-07 2006-08-24 Sony Computer Entertainment Inc プロセッサと外部のデバイスとの間にセキュアセッションを実現する方法および装置
JP2009129112A (ja) * 2007-11-21 2009-06-11 Lenovo Singapore Pte Ltd コンピュータ・システムおよびプロセスに対するデバイスの管理方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10333902A (ja) * 1997-05-27 1998-12-18 N Ii C Joho Syst:Kk 改ざん検知機能付きコンピュータシステム
JP2005522802A (ja) * 2002-04-16 2005-07-28 ソニー・コンピュータ・エンタテインメント・アメリカ・インク 改竄防止ハードウェアを使用してコピー保護およびオンラインセキュリティを提供するための方法ならびにシステム
JP2004259130A (ja) * 2003-02-27 2004-09-16 Fujitsu Ltd 改ざん検証装置および改ざん検証プログラム
JP2006018684A (ja) * 2004-07-02 2006-01-19 Ntt Docomo Inc タスク管理システム
JP2006106956A (ja) * 2004-10-01 2006-04-20 Fujitsu Ltd ソフトウェアの改竄検出装置及び改竄検出方法
JP2006221631A (ja) * 2005-02-07 2006-08-24 Sony Computer Entertainment Inc プロセッサと外部のデバイスとの間にセキュアセッションを実現する方法および装置
JP2009129112A (ja) * 2007-11-21 2009-06-11 Lenovo Singapore Pte Ltd コンピュータ・システムおよびプロセスに対するデバイスの管理方法

Similar Documents

Publication Publication Date Title
US11269989B2 (en) Systems and methods of protecting data from injected malware
US20200382302A1 (en) Security privilege escalation exploit detection and mitigation
JP4628149B2 (ja) アクセス制御装置及びアクセス制御方法
Shabtai et al. Securing Android-powered mobile devices using SELinux
KR101928127B1 (ko) 애플리케이션용 선택적 파일 액세스 기법
JP4903818B2 (ja) 端末装置及びソフトウエア検査方法
US8413230B2 (en) API checking device and state monitor
JP4676744B2 (ja) セキュリティ関連プログラミング・インターフェース
JP6129702B2 (ja) 情報処理装置、情報処理システム、プログラム
KR100917370B1 (ko) 프로그램을 저장한 컴퓨터 판독 가능 매체, 프로그램을실행하는 정보 처리 장치, 및 프로그램을 실행하기 위한프로그램 제어 방법
WO2005096121A1 (ja) 実行装置
JP5346608B2 (ja) 情報処理装置およびファイル検証システム
JPWO2007040228A1 (ja) 情報処理装置、情報処理方法およびプログラム
WO2007011001A1 (ja) 実行装置
US9344406B2 (en) Information processing device, information processing method, and computer program product
JP2009238153A (ja) マルウェア対処システム、方法及びプログラム
US20170032123A1 (en) Systems and methods of protecting data from malware processes
JP2005202523A (ja) コンピュータ装置及びプロセス制御方法
CN114651253A (zh) 用于策略强制实施的虚拟环境类型验证
JP2005316599A (ja) 割込制御装置
JP2007072969A (ja) 動作履歴保護装置及び動作履歴保護プログラム
JP4853671B2 (ja) アクセス権限判定システム、アクセス権限判定方法及びアクセス権限判定プログラム
WO2011114621A1 (ja) プログラム実行装置、情報処理方法、情報処理プログラム、記録媒体及び集積回路
JP2007034341A (ja) コンピュータシステム及びそれに用いるプログラム実行環境実現方法並びにそのプログラム
JP4937200B2 (ja) イメージ検査装置、os装置及びイメージ検査方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11755814

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11755814

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP