Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app-arch/tar-1.34: Adding a patch to fix CVE-2022-48303 #29776

Closed
wants to merge 1 commit into from

Conversation

nobellium1997
Copy link
Contributor

@nobellium1997 nobellium1997 commented Feb 24, 2023

This patch is cherry-picked from the upstream gnu/tar repository which fixes a heap buffer overflow issue in the utility. Since the tar project only made this commit in master and has not made a release with this fix yet, I'm back-porting it to 1.34 to resolve CVE-2022-48303.

No bug has been created yet since I couldn't create a bug within 24 hours of creating my gentoo bugzilla account.

tar commit in master is: 3da78400eafcccb97e2f2fd4b227ea40d794ede8

@gentoo-bot
Copy link

Pull Request assignment

Submitter: @nobellium1997
Areas affected: ebuilds
Packages affected: app-arch/tar

app-arch/tar: @gentoo/base-system

Linked bugs

No bugs to link found. If your pull request references any of the Gentoo bug reports, please add appropriate GLEP 66 tags to the commit message and request reassignment.

If you do not receive any reply to this pull request, please open or link a bug to attract the attention of maintainers.


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits. labels Feb 24, 2023
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-02-24 23:28 UTC
Newest commit scanned: 7a3d9e5
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/9c389bf66c/output.html

@nobellium1997
Copy link
Contributor Author

Just created the bug for this CVE and added it to the commit message.

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-02-27 18:53 UTC
Newest commit scanned: 53ba246
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/61e5717ab7/output.html

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-02-27 19:13 UTC
Newest commit scanned: 7358e28
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/413d500f86/output.html

@nobellium1997
Copy link
Contributor Author

Hey folks, any word on this PR?

@@ -4,7 +4,7 @@
EAPI=8

ALTERNATIVES=(
"gnu:>=app-arch/tar-1.34-r2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could keep this part if you want, but we don't really need it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, dropped.

@@ -15,7 +15,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv
IUSE="split-usr"

RDEPEND="
!<app-arch/tar-1.34-r2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop.

@@ -0,0 +1,30 @@
From 3da78400eafcccb97e2f2fd4b227ea40d794ede8 Mon Sep 17 00:00:00 2001
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include at the top of the patch:

  • A link to the relevant Gentoo bug
  • A link to the upstream commit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -37,6 +37,10 @@ PDEPEND="
app-alternatives/tar
"

PATCHES=(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't git mv for the ebuild, instead cp and then ekeyword ~all for the new ebuild.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So here's the problem, the sdk I'm using (I'm a developer for "Container OS" which is a chrome os offshoot for servers) doesn't have all the tooling you'd expect on a typical gentoo system.

The sdk is basically a barebones chroot of the gentoo userspace with bunch of stuff missing. Is there a way I could just manually set the keywords here? Do I just set them to ~all?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You just put a ~ prefix before every keyword in KEYWORDS. I can handle it now, it's definitely easy to do manually so no need for the manual tool.

@nobellium1997 nobellium1997 force-pushed the tar-cve-fix branch 2 times, most recently from 75f17f6 to 2d660d4 Compare March 24, 2023 23:33
This patch is cherry-picked from the upstream gnu/tar repository
which fixes a heap buffer overflow issue in the utility. This fix is
needed to resolve CVE-2022-48303.

Bug: https://bugs.gentoo.org/898176
Signed-off-by: Nobel Barakat <nobelbarakat@google.com>
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-03-24 23:49 UTC
Newest commit scanned: a0dee07
Status: ❌ broken

New issues caused by PR:
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#app-alternatives/tar
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#app-arch/alien
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#app-backup/amanda
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#app-backup/dirvish
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#app-backup/reoback
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#app-portage/grs
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#dev-perl/Archive-Tar-Wrapper
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#dev-ruby/git
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#dev-util/bpftool
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#dev-util/diffoscope
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#net-analyzer/oinkmaster
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#sys-apps/portage
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#sys-cluster/vzctl
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html#sys-fs/dmraid

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/7fba68b6ae/output.html

@thesamesam
Copy link
Member

Thanks, I've merged with a slightly tweaked commit message (dropped version prefix before the colon) and also restored the old stable ebuild. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits.
Projects
None yet
4 participants