CISSP PRACTICE QUESTIONS – 20210802

Effective CISSP Questions

You are writing a program using the C language to calculate the percentage of pictures in .jpg format from the total images on the hard drive. However, the process is terminated when launched because a “divide by 0” fault occurred. The operating system isolated your program to protect itself from a crash. Which of the following protection rings most likely handles the fault? (Wentz QOTD)
A. Ring 0
B. Ring 1
C. Ring 2
D. Ring 3

Kindly be reminded that the suggested answer is for your reference only. It doesn’t matter whether you have the right or wrong answer. What really matters is your reasoning process and justifications.

My suggested answer is A. Ring 0.

Wentz’s book, The Effective CISSP: Security and Risk Management, helps CISSP and CISM aspirants build a solid conceptual security model. It is a tutorial for information security and a supplement to the official study guides for the CISSP and CISM exams and an informative reference for security professionals.

Protection Ring
Protection Ring (Source: Wikipedia)

Protection Rings: Instruction Privilege Levels and OS modes

Most modern operating systems run programs in two modes: kernel and user mode. The kernel mode typically runs in privilege level 0 and the user mode runs in privilege level 3. Protection rings convey the idea of how the OS utilizes the CPU privilege level of the instruction set.

A privilege level in the x86 instruction set controls the access of the program currently running on the processor to resources such as memory regions, I/O ports, and special instructions. There are 4 privilege levels ranging from 0 which is the most privileged, to 3 which is least privileged. Most modern operating systems use level 0 for the kernel/executive, and use level 3 for application programs. Any resource available to level n is also available to levels 0 to n, so the privilege levels are rings. When a lesser privileged process tries to access a higher privileged process, a general protection fault exception is reported to the OS.

Source: Wikipedia

Exception Handling

Exception Handling
Exception Handling (Source: https://minnie.tuhs.org/)

An operating system (OS) kernel typically handles system calls from processes, exceptions from the CPU, and interrupts from peripheral devices. Applications or processes running in the user mode may come across errors or faults causing CPU level exceptions captured by the OS kernel running in the kernel mode. The OS kernel will throw the exception or send a signal to the application if a fault occurs. The following screenshot is a code snippet demonstrating that the application correctly handles an exception. However, if the application doesn’t handle the exception, the OS will terminate it.

Divide by Zero
Divide by Zero

Reference


您正在使用C語言編寫一個程式來計算 .jpg 格式的圖片在硬碟上總圖像中所佔的百分比。但是,該進程(process)在啟動時終止,因為發生了“除以 0”的錯誤。操作系統隔離了您的程序以保護自己免於崩潰。 以下哪個保護環(protection ring)最有可能處理該錯誤? (Wentz QOTD)
A. Ring 0
B. Ring 1
C. Ring 2
D. Ring 3


1 thought on “CISSP PRACTICE QUESTIONS – 20210802

  1. Pingback: 保護環0-處理故障 – Choson資安大小事

Leave a Reply