git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "‍우승훈[ 대학원석·박사통합과정수료연구(재학) / 컴퓨터학과 ]" <seunghoonwoo@korea.ac.kr>
Cc: git@vger.kernel.org
Subject: Re: Possible bug reports for git-credential-libsecret
Date: Fri, 18 Mar 2022 10:40:41 -0700	[thread overview]
Message-ID: <xmqqtubv9n1i.fsf@gitster.g> (raw)
In-Reply-To: <CAPb83E-Y8grG7MVWqjqPH6SsdZ2JJ62XUeQAe=Wb_zgn0RL90A@mail.gmail.com> (=?utf-8?B?IuKAjeyasOyKue2biFsg64yA7ZWZ7JuQ7ISdwrfrsJXsgqzthrXtlanqs7w=?= =?utf-8?B?7KCV7IiY66OM7Jew6rWsKOyerO2VmSk=?= / =?utf-8?B?7Lu07ZOo7YSw7ZWZ?= =?utf-8?B?6rO8?= ]"'s message of "Sat, 19 Mar 2022 02:15:30 +0900")

"‍우승훈[ 대학원석·박사통합과정수료연구(재학) / 컴퓨터학과 ]"
<seunghoonwoo@korea.ac.kr> writes:

> Recently, I noted that the vulnerability patch (CVE-2020-5260) for
> "git credential" is not applied in the "git-credential-libsecret"
> program (./contrib/credential/libsecret/git-credential-libsecret.c).

The code in credential.c touches the data directly obtained from the
outside world.  It opens a pipe to backends like credential-store
and credential-libsecret and feeds the data that is cleansed by the
code you saw in credential.c::credential_write_item() to these
backends.

What these backends write come from these keyring storage systems.
If you look at other backends in contrib/ and also credential-store
and credential-cache, you'll see similar code to give "username=%s"
and "password=%s" back to us in all of them.

Do you have a reason to suspect that these keyring storage systems
the backends talk with can be as malicious as the data source the
CVE patch tried to protect us against?  If an attacker can already
contaminate the contents of the keyrings these backends read from
and write to, they do not have to use "git credential" as their
attack vector, I would suspect.

So I would think it is natural to expect that the patch you saw is
the only defence you need.


  reply	other threads:[~2022-03-18 17:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18 17:15 Possible bug reports for git-credential-libsecret ‍우승훈[ 대학원석·박사통합과정수료연구(재학) / 컴퓨터학과 ]
2022-03-18 17:40 ` Junio C Hamano [this message]
2022-03-18 18:19   ` ‍우승훈[ 대학원석·박사통합과정수료연구(재학) / 컴퓨터학과 ]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-09 17:53 ‍우승훈[ 대학원석·박사통합과정수료 / 컴퓨터학과 ]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqtubv9n1i.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=seunghoonwoo@korea.ac.kr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).