-1

O/S has free pool of pages. So different process can release pages into free pool. Before it takes a page from pool O/S zero-out page. Because their may be confidential data on pages. But why it zero-out? Is it necessary? It can't see even if their is confidential data. because address spaces of different process is unique.

What is the reason for zero-out pages before allocate?

Kasun
  • 181
  • 11
  • 1
    Already answered [here](https://stackoverflow.com/a/1309314/13020139) and [here](https://stackoverflow.com/questions/786093/does-using-securezeromemory-really-help-to-make-the-application-more-secure) – wxz Feb 20 '21 at 06:39

1 Answers1

1

Processes can see confidential data if the OS lets them.

If process A gets a page of physical memory, and writes confidential data to that page, and then frees it, and then process B gets the same physical page, process B can see the data on that page!

The only reason why process B normally can't see the data is BECAUSE the operating system zeroes it out!

user253751
  • 50,383
  • 6
  • 45
  • 81