pbunzip2 crash for some read only files

Bug #717852 reported by Jeff Gilchrist
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pbzip2
Fix Released
Medium
Yavor Nikolov
1.1
Fix Released
Medium
Yavor Nikolov

Bug Description

From RedHat bug report (see sample file on redhat report page): https://bugzilla.redhat.com/show_bug.cgi?id=666678

abrt version: 1.1.14
architecture: i686
Attached file: backtrace
cmdline: pbunzip2
/home/mihai/projects/smart-park/pcb/eagle/GW-2.0/gw_2_0-gerbers.tar.bz2
comment: I was running a script that converted all bzip2-compressed files to xz
in two steps: first decompress using pbzip2, then compress using pxz. At some
point in the list, pbunzip2 crashed frequently for many files (a few tens of
times, each on a different file). On the files before and after that it
appears to work OK.
component: pbzip2
crash_function: ferror
executable: /usr/bin/pbzip2
kernel: 2.6.35.9-64_1.cubbi_tuxonice.fc14.i686
package: pbzip2-1.1.1-1.fc14
rating: 4
reason: Process /usr/bin/pbzip2 was killed by signal 11 (SIGSEGV)
release: Fedora release 14 (Laughlin)
time: 1293961184
uid: 16412

How to reproduce
-----
1. Called pbunzip2 with the compressed file as argument
2. Crash happened.
3.

Related branches

Revision history for this message
Yavor Nikolov (yavor-nikolov) wrote :

Bug confirmed:
Root cause is crash in directdecompress function due to calling ferror(stream) on NULL stream.

Affected scenarios:
 - read-only target directory
 - ones which call directdecompress (i.e. - single-thread execution: very small files, or -p1 parameter used (or single CPU with default options)

Current workaround: use stream redirection or pipes (-c option): directdecompress is not used in these scenarios. (Or just avoid read-only target directories if possible)

Changed in pbzip2:
status: New → Fix Committed
assignee: nobody → Yavor Nikolov (yavor-nikolov)
status: Fix Committed → Confirmed
Changed in pbzip2:
status: Confirmed → Fix Committed
Changed in pbzip2:
importance: Undecided → Medium
milestone: none → 1.1.2
Changed in pbzip2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.