Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 537852 - sys-kernel/git-sources with sys-devel/patch-2.7.3 - patch: symbolic link target '../../../../../include/dt-bindings' is invalid
Summary: sys-kernel/git-sources with sys-devel/patch-2.7.3 - patch: symbolic link targ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Miscellaneous
URL: https://lkml.org/lkml/2015/1/26/522
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-26 12:17 UTC by Helmut Jarausch
Modified: 2015-02-04 14:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2015-01-26 12:17:13 UTC
with sys-devel/patch-2.7.3 installed, one cannot emerge sys-kernel/git-sources anymore. (stepping back to 2.7.2 fixes this)

 * Applying patch-3.19-rc5.patch (-p1) ...
symbolic link target '../../../../../include/dt-bindings' is invalid
 [ !! ]
 * Failed to apply patch patch-3.19-rc5.patch

The same is true for git-sources-3.19-rc6 which is not in the tree, yet.
Comment 1 Mike Pagano gentoo-dev 2015-01-26 13:31:51 UTC
emerge --info and .config, please
Comment 2 Mike Pagano gentoo-dev 2015-01-26 13:34:04 UTC
Nevermind, I see the failure.
Comment 3 Mike Pagano gentoo-dev 2015-01-26 15:03:13 UTC
It looks like this patch might be the culprit.

http://git.savannah.gnu.org/cgit/patch.git/commit/?id=41688ad8ef88bc296f3bed30b171ec73e5876b88

Base-system maintainers. Thoughts?
Comment 4 jospezial 2015-01-26 17:25:42 UTC
As I understand from that commit, then this is a bug upstream in the kernel git or how the patch is created.


http://git.savannah.gnu.org/cgit/patch.git/plain/src/util.c :

/* Only allow symlink targets which are relative and free of ".." components:
 * otherwise, the operating system may follow one of those symlinks in a
 * pathname component, leading to a path traversal vulnerability.
 *
 * An alternative to disallowing many kinds of symlinks would be to implement
 * path traversal in user space using openat() without following symlinks
 * altogether.
 */
Comment 5 Mike Pagano gentoo-dev 2015-01-26 18:25:03 UTC
Yes, it's a security patch for patch, so I'll take this back. For now, I'll mask this version for git and gentoo-sources.
Comment 6 Mike Pagano gentoo-dev 2015-01-29 20:15:02 UTC
So, this is being discussed upstream at lkml.org.

This might end up being fixed via a patch to git.

So an unfortunate requirement to install git-sources is <2.7.3 of patch.

If this is an issue, you have the alternative of cloning the upstream kernel repo by hand.
Comment 7 Maxim Britov 2015-02-04 10:57:09 UTC
I can build git-sources with new patch-2.7.4
Please look and unmask 2.7.4
Comment 8 Mike Pagano gentoo-dev 2015-02-04 14:18:16 UTC
(In reply to Maxim Britov from comment #7)
> I can build git-sources with new patch-2.7.4
> Please look and unmask 2.7.4

 04 Feb 2015; Mike Pagano <mpagano@gentoo.org> -git-sources-3.19_rc1.ebuild,
  -git-sources-3.19_rc2.ebuild, -git-sources-3.19_rc3.ebuild,
  -git-sources-3.19_rc4.ebuild, -git-sources-3.19_rc5.ebuild,
  -git-sources-3.19_rc6.ebuild, git-sources-3.19_rc7.ebuild:
  Fix patch version dependency. Drop old