Home GnuPG
Diffusion GnuPG 907a9a1e986b

gpgsm: Return NULL on fail
907a9a1e986bUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpgsm: Return NULL on fail

* sm/gpgsm.c (parse_keyserver_line): Set SERVER to NULL.

Cherry-pick of abd5f6752d693b7f313c19604f0723ecec4d39a6.

"If something inside the ldapserver_parse_one function failed,
 'server' would be freed, then returned, leading to a
 use-after-free.  This code is likely copied from sm/gpgsm.c, which
 was also susceptible to this bug."
  • Reported-by: Joshua Rogers <git@internot.info>
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Dec 22 2014, 12:16 PM
gniibeCommitted on Jan 13 2015, 2:49 AM
Parents
rGd2b0e613131d: gpg: Fix possible read of unallocated memory
Branches
Unknown
Tags
Unknown

Event Timeline

NIIBE Yutaka <gniibe@fsij.org> committed rG907a9a1e986b: gpgsm: Return NULL on fail (authored by Werner Koch <wk@gnupg.org>).Jan 13 2015, 2:49 AM