Bug 570183 - libpoppler security upgrade breaks xpdf
Summary: libpoppler security upgrade breaks xpdf
Status: VERIFIED FIXED
: 571361 573867 (view as bug list)
Alias: None
Product: openSUSE 11.2
Classification: openSUSE
Component: X11 Applications (show other bugs)
Version: Final
Hardware: i586 openSUSE 11.2
: P3 - Medium : Major with 8 votes (vote)
Target Milestone: ---
Assignee: Security Team bot
QA Contact: E-mail List
URL:
Whiteboard: maint:released:11.2:30676 maint:relea...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-12 23:18 UTC by David Davey
Modified: 2016-04-15 10:41 UTC (History)
18 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
PDF file which triggers Segmentation violation (1.02 MB, application/pdf)
2010-01-12 23:18 UTC, David Davey
Details
new safeint patch (136.16 KB, patch)
2010-01-20 12:53 UTC, Marcus Meissner
Details | Diff
interdiff (2.60 KB, patch)
2010-01-20 12:54 UTC, Marcus Meissner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Davey 2010-01-12 23:18:51 UTC
Created attachment 336274 [details]
PDF file which triggers Segmentation violation

User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.6) Gecko/20091206 SeaMonkey/2.0.1

After doing online update to libpoppler 0.12.0-3.7.1  (x86_64) xpdf reports segmentation violation when opening some pdf files, before opening
a window.  Reverting to /usr/lib64/libpoppler.so.5.0.0 distributed with the
11.2 release fixes problem.  I will attach a file which triggers fault.  This
has been confirmed on two 64 bit machines.

Reproducible: Always

Steps to Reproduce:
1. upgrade libpoppler (on 64 bit machine)
2. open attached PDF file with xpdf
3.
Actual Results:  
Segmentation fault

Expected Results:  
file displayed
Comment 1 Bin Li 2010-01-13 09:41:21 UTC
I'd take care of it.
Comment 2 Joachim Deguara 2010-01-14 18:17:47 UTC
Same here and more precisely I downgraded to version 0.12.0-3.5 of libpoppler5 and it worked.
Comment 3 Bin Li 2010-01-15 07:56:46 UTC
Done.

I found the reason, this security update change some header's of xpdf-poppler used, when I build the xpdf-poppler with the latest libpoppler-devel,  it works fine.

 You can test it from my build service for test.

https://api.opensuse.org/build/home:BinLi:branches:openSUSE:11.2/standard/i586/xpdf-poppler/xpdf-poppler-3.02-7.1.i586.rpm
https://api.opensuse.org/build/home:BinLi:branches:openSUSE:11.2/standard/x86_64/xpdf-poppler/xpdf-poppler-3.02-7.1.x86_64.rpm
Comment 4 Bin Li 2010-01-15 08:07:41 UTC
Thomas,

 When update the fix from Bug #507102 - VUL-0: poppler: multiple integer overflows in "pdftops" filter (CVE-2009-0791), the xpdf-poppler also need to be updated.
 How do let it work?
Comment 5 Thomas Biege 2010-01-15 08:25:41 UTC
When we (sec-team) know the list of affected packages we just would create patchinfos for them in SWAMP. xpdf-poppler depends on poppler which means it will be rebuild automatically.

Should we release xpdf-poppler?
Comment 6 Bin Li 2010-01-15 08:39:46 UTC
Yes, we need release the xpdf-poppler.

And from Bug 569318 - libpoppler4 too old for KDE Okular in KDE SC 4.4, maybe we need also release the kdegraphics4 which depends the libpoppler-devel in openSUSE 11.1, currently I'm not 11.1 in hand, so I need to install a new to make sure about it.

 So do we fixed together? If not, release this first.

Thanks!
Comment 7 Ludwig Nussel 2010-01-15 09:02:22 UTC
so the safeint patch broke binary compatibility which is not surprising and bad for a library in released distros. How did upstream fix the problems?
Comment 8 Bin Li 2010-01-15 09:18:29 UTC
Ludwig,

 Gabriel already submit the safeint patch into upstream from https://bugs.freedesktop.org/show_bug.cgi?id=26047 .
 And the upstream refuse to accept it.
Comment 9 Ludwig Nussel 2010-01-15 09:29:44 UTC
Well, what do you expect if you submit a patch for an old version? That was not my question anyways. Since upstream doesn't use the safeint patch how does their fix look like?
Comment 10 Bin Li 2010-01-15 09:38:57 UTC
Ludwig,

 It don't need a patch for just rebuild the xpdf-poppler which depends the new libpoppler-devel.
 
 The upstream thought this CVE bug is a making money bug, :), so not care of it very much.
Comment 11 Marcus Meissner 2010-01-15 10:39:46 UTC
The problem is that we should not change the ABI on our library packages.

there is more than xpdf-poppler linking against poppler for instance, we have sev eral others (evince, kde4-okular, cups) ... Also the customer can have their own applications linking against poppler and we might have broken them without chance for us to fix it.
Comment 12 Detlef Reichelt 2010-01-15 11:55:58 UTC
And some other application doesn't build with the sec update, for example:

libextractor -> http://www.gnu.org/software/libextractor/

config.log:

configure:19382: checking poppler/goo/gmem.h usability
configure:19382: gcc -c -fno-strict-aliasing -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables  conftest.c >&5
In file included from conftest.c:108:
/usr/include/poppler/goo/gmem.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SafeInt'
/usr/include/poppler/goo/gmem.h:126: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'operator'

Detlef
Comment 13 Bin Li 2010-01-15 15:52:47 UTC
Detlef,

 I think you should use g++ instead of gcc for your issue.
Comment 14 Marcus Meissner 2010-01-16 15:42:20 UTC
*** Bug 571361 has been marked as a duplicate of this bug. ***
Comment 15 Marcus Meissner 2010-01-16 15:42:35 UTC
*** Bug 571293 has been marked as a duplicate of this bug. ***
Comment 16 Bin Li 2010-01-18 02:53:06 UTC
->Security team.
Comment 17 Marcus Meissner 2010-01-18 16:54:35 UTC
cc dirk, pgajdos
Comment 18 Ludwig Nussel 2010-01-19 15:08:15 UTC
I'd vote for reverting the update and fix it in a better way
Comment 19 Marcus Meissner 2010-01-19 15:14:01 UTC
we need to at least revert the SafeInt patch.

the g*alloc binary incompatible change is not acceptable.


(and also these g*alloc functions are C functions, not C++, so we cannot use classes)
Comment 20 Petr Gajdos 2010-01-19 17:49:56 UTC
(In reply to comment #9)
> my question anyways. Since upstream doesn't use the safeint patch how does
> their fix look like?

The problem is, that our security team wanted better fix than upstream have :-). That is why the xpdf-safe-int.patch has arisen, why is so huge and why I was convinced from the beginning this patch is not upstreamable. I suggest read bug 502974 for more informations. 

I have talked with sbrabec and he suggested to (carefully) consider version update for poppler, if there is no ABI change and addresses said security problem sufficiently. 

Alternatively (for older distributions for example), original small patch from upstream -- bug 502061, comment 2 could be backported.
Comment 21 Marcus Meissner 2010-01-20 12:51:32 UTC
I have found a method to make the safeint patch more "safe" for this reasons,
by hjust exporting the extern "C" version with normal ints and  C++ variants with SafeInt.

I am attaching the new patch and the diff between the two.
Comment 22 Marcus Meissner 2010-01-20 12:53:02 UTC
Created attachment 337644 [details]
new  safeint patch
Comment 23 Marcus Meissner 2010-01-20 12:54:07 UTC
Created attachment 337646 [details]
interdiff

incremental patch to the one we released.

(both for 11.2)
Comment 24 Marcus Meissner 2010-01-20 13:49:27 UTC
That said ...

Unless we can bring this patch upstream I would say that we remove it from our packages again and proceed with either smaller patches or a version upgrade.

for 11.2 a version upgrade might be feasible (major version is still "5"), for older products not so easy.

We would only revert the safeint patch from poppler (it can stay in the xpdfs and other non libraries).

so to do:
- bili: remove safe int patch from popplers and get them submitted, all opensuse and sle branches :/ so we can proceed with unbreaking the buildsystem and our customers.


- bili: for 11.2 can you do test builds of a version update to 0.12.3?


- did we miss any security fixes?
Comment 25 Reinhard Max 2010-01-26 14:19:34 UTC
*** Bug 573867 has been marked as a duplicate of this bug. ***
Comment 26 Bin Li 2010-02-02 08:14:53 UTC
I do it now, submit it later, :)
Comment 27 Bin Li 2010-02-02 09:53:47 UTC
Marcus,

 Do we need a swampid for it? I prepare resubmit it without safe-int patch.
Comment 28 Swamp Workflow Management 2010-02-02 10:16:36 UTC
The SWAMPID for this issue is 30658.
Please submit the patch and patchinfo file using this ID.
(https://swamp.suse.de/webswamp/wf/30658)
Comment 29 Marcus Meissner 2010-02-02 10:17:36 UTC
yes.
Comment 30 Bin Li 2010-02-02 11:02:40 UTC
Done for 11.1 and sle11.

 31311  State:new     Creator:BinLi        When:2010-02-02T11:57:47
        submit:       home:BinLi:branches:openSUSE:11.1:Update/poppler    ->  openSUSE:11.1:Update   
        Comment: 'Comment poppler-CVE-2009-0791-safe-int.patch(bnc#570183,swampid#30658)'

  4284  State:new     Creator:BinLi        When:2010-02-02T12:01:44
        submit:       home:BinLi:branches:SUSE:SLE-11:Update/poppler      ->  SUSE:SLE-11:Update     
        Comment: 'Comment poppler-safe-int.patch(bnc#570183,swampid#30658)'
Comment 31 Marcus Meissner 2010-02-02 12:13:36 UTC
also 11.2 please, this is where we had the original reports
Comment 32 Bin Li 2010-02-02 16:10:34 UTC
Marcus,

 Done for 11.2, and I upgrade to 0.12.3, and delete some patches which were in upstream.

 31346  State:new     Creator:BinLi        When:2010-02-02T16:57:07
        submit:       home:BinLi:branches:openSUSE:11.2:Update:Test/poppler  ->  openSUSE:11.2:Update:Test   
        Comment: 'Update to version 0.12.3(bnc#507183,swampid#30658)'
Comment 33 Bin Li 2010-02-03 10:02:59 UTC
-> Security team.
Comment 34 Thomas Biege 2010-02-03 15:41:05 UTC
Thanks!
Comment 35 Christian Boltz 2010-02-12 00:09:20 UTC
It looks like the update has dependency problems with okular on openSUSE 11.2 - see bug 579370 for details.
Comment 36 Thomas Biege 2010-02-12 08:55:03 UTC
reassigning to Bin Li.
Comment 37 Marcus Meissner 2010-02-12 08:57:00 UTC
I had discussed this with Dirk and we reviewed this case ...


We will be releasing an updated okular too, in the KDE 4.3.5 update.

So the release of the poppler 11.2 update will just wait until ther KDE 4.3.5 
upgrade.

So nothing to do but wait right now.
Comment 38 io proprioio 2010-02-15 08:06:53 UTC
Are you saying that opensuse 11.2 users will fix the problem only if they will upgrade to kde 4.3.5?
Comment 39 Marcus Meissner 2010-02-15 09:48:59 UTC
the poppler update will update "okular" if present on the system. it does not require the kde 4.3.5 update
Comment 40 Uwe Bonnes 2010-02-15 11:45:29 UTC
The answers here are very dense and not very understandable for affected users.

So "the poppler update will update "okular"" means that the update has not rolled out yet? Any estimation when it will happen? This list talks about the update for over two weeks now, with xpdf in an unuable state since over a month...
Comment 41 Marcus Meissner 2010-02-15 12:26:29 UTC
The update has not been rolled out yet.

I am sorry that its taking so long, but fixing base libraries like poppler is not easy nor fun, especially if you do serveral tries.
Comment 42 io proprioio 2010-02-15 12:55:35 UTC
But why should opensuse 11.2 users wait the kde 4.3.5 upgrade if poppler patch is independent?
Comment 43 Marcus Meissner 2010-02-15 13:31:19 UTC
we decided to do a version upgrade for poppler in 11.2.

however okular (KDE PDF / Document viewer) has a requires: poppler-qt == %version
on the poppler version it was built on, so the two are connected to each other.
thats hte reason we need to do this in sync.
Comment 44 Swamp Workflow Management 2010-02-24 15:56:15 UTC
Update released for: libpoppler-devel, libpoppler-doc, libpoppler-glib-devel, libpoppler-glib4, libpoppler-glib4-debuginfo, libpoppler-qt2, libpoppler-qt2-debuginfo, libpoppler-qt3-devel, libpoppler-qt4-3, libpoppler-qt4-3-debuginfo, libpoppler-qt4-devel, libpoppler5, libpoppler5-debuginfo, poppler, poppler-debugsource, poppler-tools, poppler-tools-debuginfo
Products:
openSUSE 11.2 (debug, i586, x86_64)
Comment 45 Marcus Meissner 2010-02-24 15:57:41 UTC
donereelased
Comment 46 io proprioio 2010-02-27 12:05:29 UTC
I updated but xpdf looks broken: it does not start any more.
This is its output:
xpdf: symbol lookup error: xpdf: undefined symbol: _ZN12GlobalParams23setForceNoFTAutoHintingEPc

Does xpdf-poppler need an update?

My xpdf-poppler is xpdf-poppler-3.02-4.3.i586
Comment 47 Marcus Meissner 2010-03-01 13:31:18 UTC
xpdf-poppler update released
Comment 48 Karl Eichwalder 2010-03-01 14:34:58 UTC
Works for me.
Comment 49 io proprioio 2010-03-06 17:43:41 UTC
For me too.
Comment 50 David Davey 2010-03-06 22:53:33 UTC
Do I have to do something other than a normal on-line update?  I don't
get a segmentation violation any longer, but I do get this failure:
/usr/bin/xpdf: symbol lookup error: /usr/bin/xpdf: undefined symbol: _ZN15SplashOutputDev18setFreeTypeHintingEi
Comment 51 io proprioio 2010-03-07 10:35:03 UTC
I just updated.
Comment 54 Swamp Workflow Management 2010-03-11 12:27:55 UTC
Update released for: libpoppler4
Products:
openSUSE 11.1 (i586, ppc, x86_64)
Comment 55 Swamp Workflow Management 2010-03-25 10:34:30 UTC
Update released for: libpoppler-devel, libpoppler-doc, libpoppler-glib-devel, libpoppler-glib4, libpoppler-qt2, libpoppler-qt3-devel, libpoppler-qt4-3, libpoppler-qt4-devel, libpoppler4, poppler, poppler-debuginfo, poppler-debugsource, poppler-tools
Products:
SLE-DEBUGINFO 11 (i386, ia64, ppc64, s390x, x86_64)
SLE-DESKTOP 11 (i386, x86_64)
SLE-SDK 11 (i386, ia64, ppc64, s390x, x86_64)
SLE-SERVER 11 (i386, ia64, ppc64, s390x, x86_64)
Comment 56 Bernhard Wiedemann 2016-04-15 10:41:07 UTC
This is an autogenerated message for OBS integration:
This bug (570183) was mentioned in
https://build.opensuse.org/request/show/31311 11.1 / poppler