diff options
| author | Eric Biggers <ebiggers@google.com> | 2018-03-24 23:21:29 -0700 |
|---|---|---|
| committer | Eric Biggers <ebiggers3@gmail.com> | 2018-03-24 23:50:36 -0700 |
| commit | 81942ab75c02e720970d6af069e8b8cf3ef847bb (patch) | |
| tree | 1df58e59595ea964928c57ae78136dd53e647d51 /security | |
| parent | 3ef69aaafcfe6df03097d9ebdc8e4c7f7516999b (diff) | |
pam: return error when PAM info item is unset
pam_fscrypt is crashing with a segfault in copyIntoSecret() when using
Ctrl-C to interrupt a 'sudo' prompt. It is dereferencing a NULL pointer
that is supposed point to the PAM_AUTHTOK item. The problem is that the
Go code assumes pam_get_item() returns a non-success status if the item
is unset, when actually it sets the data pointer to NULL and returns
PAM_SUCCESS.
Fix it by making pam.Handle.GetItem() return an error in that case.
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions