Is explicitly clearing/zeroing sensitive variables after use sensible?

前端 未结 4 806
情歌与酒
情歌与酒 2021-01-04 12:44

I have noticed some programs explicitly zero sensitive memory allocations after use. For example, OpenSSL has a method to clear the memory occupied by an RSA key:

\"

4条回答
  •  一整个雨季
    2021-01-04 13:02

    From a security standpoint, your memory might contain data that you would not like to linger around. If the process crashes and the core file will have the complete dump of the memory. It is possible to dig into those core files and mine data. For a support call, if you have to send that core file, you would feel safer if the memory is sanitized after use. When I worked on VMS, some sensitive customers would refrain from even giving us the dump files (making this extremely difficult to debug).

提交回复
热议问题