Dr.Knowitall
Dr.Knowitall

Reputation: 10468

Can protection mode be turned off with inline assembly?

If a user didn't have root privileges, could that user still write a user space program with inline assembly to turn off protection mode on the computer to overwrite memory in other segments assuming the OS is linux?

Upvotes: 2

Views: 236

Answers (2)

jimw
jimw

Reputation: 2598

Not unless the user knows of a security vulnerability to get root permissions. Mechanisms like /dev/mem allow root to read and write all userspace memory, and kernel module loading allows root access to kernel memory and the rest of the system's IO space.

Upvotes: 5

Jerry Coffin
Jerry Coffin

Reputation: 490008

Assuming the system is working as intended, no.

In reality, there are undoubtedly a few holes somewhere that would allow it -- given a code base that size, bugs are inevitable, and a few could probably be exploited to get into ring 0.

That said, I'm only guessing based on statistics -- I can't point to a specific vulnerability.

Upvotes: 4

Related Questions