We generally think of the interface between RAM and everywhere else as a security boundary.
RAM is generally totally trusted.
Databases, a little trusted.
Filesystems, a little less so.
Network packets, totally untrusted.
Note: these trust levels pretty much are completely destroyed by Cloud-hosted compute servers. Cloud RAM should now be 'utterly untrusted'; it lives in the Network, not in Your Data Center.
We have not come anywhere near grasping the implications of this. This will bite us.