diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2016-12-30 18:38:51 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-13 09:43:21 +0000 |
commit | d0365f35303db3595688a6e5290677e02a72c54e (patch) | |
tree | 41a7989277ed93b4d48c7d331de742fa177fcda9 /meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch | |
parent | 2358e786ec8d1199d90e181eb5d8d00816f669b4 (diff) | |
download | openembedded-core-contrib-d0365f35303db3595688a6e5290677e02a72c54e.tar.gz |
rpm: remove 5.x recipe
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch deleted file mode 100644 index 057925fb64..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch +++ /dev/null @@ -1,43 +0,0 @@ -We need to sanity check that the nlink size and our linksLeft counter -do match. If an rpm is badly constructed with identical inode values -for multiple hardlinked files, such an rpm will otherwise access memory -out of array bounds and cause memory corruption and crashes. - -The fix is to add in the sanity check and exit if bad circumstances -are found. We need to fix the caller to check the return code too. - -RP 2014/6/10 - -Upstream-Status: Submitted [RPM5 maintainer] - -Index: rpm-5.4.14/lib/fsm.c -=================================================================== ---- rpm-5.4.14.orig/lib/fsm.c -+++ rpm-5.4.14/lib/fsm.c -@@ -495,6 +495,11 @@ static int saveHardLink(/*@special@*/ /* - } - - if (fsm->goal == IOSM_PKGBUILD) --fsm->li->linksLeft; -+ if (fsm->li->linksLeft > st->st_nlink) { -+ rpmlog(RPMLOG_ERR, _("Corrupted hardlinks found (count %d does not match %d), exiting.\n"), fsm->li->linksLeft, st->st_nlink); -+ return -1; -+ } -+ - fsm->li->filex[fsm->li->linksLeft] = fsm->ix; - /*@-observertrans -dependenttrans@*/ - fsm->li->nsuffix[fsm->li->linksLeft] = fsm->nsuffix; -@@ -1878,8 +1883,13 @@ if (!(fsmGetFi(fsm)->mapflags & IOSM_PAY - fsm->postpone = iosmFileActionSkipped(fsm->action); - if (fsm->goal == IOSM_PKGINSTALL || fsm->goal == IOSM_PKGBUILD) { - /*@-evalorder@*/ /* FIX: saveHardLink can modify fsm */ -- if (S_ISREG(st->st_mode) && st->st_nlink > 1) -+ if (S_ISREG(st->st_mode) && st->st_nlink > 1) { - fsm->postpone = saveHardLink(fsm); -+ if (fsm->postpone < 0) { -+ rc = RPMRC_FAIL; -+ break; -+ } -+ } - /*@=evalorder@*/ - } - if (fsmGetFi(fsm)->mapflags & IOSM_PAYLOAD_LIST) fsm->postpone = 1; |