Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I just checked the source and openssh doesn't appear to set madvise(MADV_DONTDUMP) anywhere :-( That seems like an oversight? For comparison openssl has a set of "secure malloc" functions (for keys etc) which uses MADV_DONTDUMP amongst other mitigations.


On OpenBSD, you'd be looking for MAP_CONCEAL, though it's not used in many places, either.


Interestingly, it looks like ssh-agent disables core dumps[1], but I don't see similar usage for sshd

1: https://github.com/openssh/openssh-portable/blob/694150ad927...


sshd runs as root, so the core dumps would be readable as root-only, no? If you have root access already you could dump it even while it's still running with ptrace anyways


>sshd runs as root, so the core dumps would be readable as root-only, no

Yes, although the article we're discussing shows that you can't rely on that, the dump could be subsequently moved to a developer machine for investigation, and unencrypted key material left in could be compromised that way... defense in depth would make sense here.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: