docker / docker/docker-credential-helpers

potential leak in secretservice

Open Beginner friendly
#459 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.3k
Forks
195
Avg merge
1d 20h
Merged PRs (30d)
5

Description

https://github.com/docker/docker-credential-helpers/blame/6bcdedb630ade6022bf70d3f9c1f0471785e7ee5/secretservice/secretservice.c#L52-L57

here the g_hash_table_unref is only called when no match is found. shouldn't this be also called before a return of the value under if strncmp() condition?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open secretservice/secretservice.c at lines 52-57 and trace the g_hash_table_unref call through the strncmp() branch. Confirm the table is released on every return path, then run the repository's existing tests to verify secretservice behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.