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

Program received signal SIGABRT, Aborted #154

Closed
cx104906 opened this issue Apr 16, 2024 · 3 comments
Closed

Program received signal SIGABRT, Aborted #154

cx104906 opened this issue Apr 16, 2024 · 3 comments

Comments

@cx104906
Copy link

when I use ./podofopdfinfo test
program abort
Is this a bug or vulnerability? or normal behavior?
outpus :

Document Info
-------------
	File: test
	PDF Version: 1.5
	Page Count: 1
terminate called after throwing an instance of 'std::runtime_error'
  what():  Invalid rotation
已放弃

And gdb trace

gdb podofopdfinfo 
GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from podofopdfinfo...done.
(gdb) set args test
(gdb) set logging on
Copying output to gdb.txt.
(gdb) set pagination off
(gdb) run
Starting program: /home/cas/chenxu/try_cve/verifycrash/test/podofopdfinfo test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Document Info
-------------
	File: test
	PDF Version: 1.5
	Page Count: 1
terminate called after throwing an instance of 'std::runtime_error'
  what():  Invalid rotation

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: 没有那个文件或目录.
(gdb) backtrace
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff469d7f1 in __GI_abort () at abort.c:79
#2  0x00007ffff56da646 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff56ebf06 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff56ebf71 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff56ec1b4 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff77e93f9 in PoDoFo::PdfPage::getPageBox (this=<optimized out>, inBox=..., isInheritable=<optimized out>, raw=<optimized out>) at /home/cas/chenxu/try_cve/verifycrash/podofo/src/podofo/main/PdfPage.cpp:237
#7  0x00007ffff77e7f50 in PoDoFo::PdfPage::GetMediaBox (this=<optimized out>, raw=<optimized out>) at /home/cas/chenxu/try_cve/verifycrash/podofo/src/podofo/main/PdfPage.cpp:572
#8  0x00000000004db7a2 in PdfInfoHelper::GuessFormat[abi:cxx11]() (this=<optimized out>) at /home/cas/chenxu/try_cve/verifycrash/podofo/tools/podofopdfinfo/pdfinfo.cpp:224
#9  0x00000000004d9ff2 in PdfInfoHelper::OutputDocumentInfo (this=0x7fffffffdc60, sOutStream=...) at /home/cas/chenxu/try_cve/verifycrash/podofo/tools/podofopdfinfo/pdfinfo.cpp:32
#10 0x00000000004d83fd in Main (args=...) at /home/cas/chenxu/try_cve/verifycrash/podofo/tools/podofopdfinfo/podofopdfinfo.cpp:97
#11 0x000000000058dc3f in main (argc=<optimized out>, argv=<optimized out>) at /home/cas/chenxu/try_cve/verifycrash/podofo/tools/private/MainEntryPoint.cpp:35
(gdb) 

I don't quite understand, sorry for the disturbance.
I will provide the test file if necessary.

@ceztko
Copy link
Contributor

ceztko commented Apr 17, 2024

Please, attach the test file.

@cx104906
Copy link
Author

OK,test file is here: test

Please, attach the test file.

@ceztko ceztko closed this as completed in 49cb4d7 May 15, 2024
@ceztko
Copy link
Contributor

ceztko commented May 15, 2024

The file has an invalid rotation /Rotate 8, which is normalized to 0 in Adobe products. The issue should be fixed in master, which implements a normalization that should match the one in Adobe products, but don't expect a backport to 0.10.x: as per PDF specification the rotation shall be a multiple of 90, and PoDoFo threw a regular exception. podofopdfinfo itself is not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants