x86 - Accessing underprivileged stack by weakening the CPL with RPL in intel microprocessor -


as far know, when want access stack segment, dpl of descriptor should equal

max(rpl,cpl)

where rpl of ss segment register, , cpl means current privilege level.

so can access underprivileged stack weakening our cpl rpl? example, cpl=0, rpl=3 ss segment register. should able access stack of pl 3. true?

no.

section 5.7 of intel sdm clear

privilege level checking occurs when ss register loaded segment selector stack segment.
here privilege levels related stack segment must match cpl; is, cpl, rpl of stack segment selector, , dpl of stack-segment descriptor must same. if rpl , dpl not equal cpl, general-protection exception (#gp) generated.

the rationale privileged code cannot afford share stack unprivileged code security reasons - each privilege has own stack defined in tss.

you can access stack data segment register (e.g. through ds), in case 1 must have max(cpl, rpl) <= dpl (weakened cpl still more or equally privileged dpl of segment).


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -