A buffer overflow is a particular kind of security bug. Not all security bugs are buffer overflows.

An exploit is a program written to expose or take advantage of a security bug.

You would use...