Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1741605

Summary: jbig2dec needs to be rebased to 0.16 (currently 0.14) for ghostscript rebase to 9.27
Product: [Fedora] Fedora Reporter: Martin Osvald <mosvald>
Component: jbig2decAssignee: Michael J Gruber <mjg>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mjg, pzhukov
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: jbig2dec-0.16-1.fc31 jbig2dec-0.16-1.fc30 jbig2dec-0.16-1.fc29 jbig2dec-0.16-2.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-16 05:46:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1696192    

Description Martin Osvald 2019-08-15 14:31:13 UTC
Description of problem:

For Ghostscript to be rebased to 9.27, it needs jbig2dec-0.16.

Mentioned also on release pages for 9.27:

https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/tag/gs927


Actual results:

~~~
make[2]: Entering directory '/home/mosvald/Work/redhat/src/ghostscript/fedora/ghostscript/f29/ghostscript-9.27'
gcc  -DHAVE_MKSTEMP -DHAVE_FILE64 -DHAVE_FSEEKO -DHAVE_MKSTEMP64 -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_SSE2 -DHAVE_DBUS -DHAVE_BSWAP32 -DHAVE_BYTESWAP_H -DHAVE_STRERROR -DHAVE_ISNAN -DHAVE_ISINF  -DHAVE_PREAD_PWRITE=1 -DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE -fPIC  -O2 -fPIC \
         -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -fno-strict-aliasing -Werror=declaration-after-statement -fno-builtin -fno-common -Werror=return-type -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_LIBDL=1 -DGX_COLOR_INDEX_TYPE="unsigned long long" -D__USE_UNIX98=1  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DHAVE_RESTRICT=1 -DUSE_LIBPAPER  -fno-strict-aliasing -DHAVE_POPEN_PROTO=1 -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/usr/lib64/ghostscript\"  -I./soobj -I./base -I./devices -Isrc   -o ./soobj/sjbig2.o -c ./base/sjbig2.c
./base/sjbig2.c: In function 's_jbig2decode_make_global_data':
./base/sjbig2.c:228:35: warning: passing argument 4 of 'jbig2_ctx_new' from incompatible pointer type [-Wincompatible-pointer-types]
                             NULL, s_jbig2decode_error, NULL);
                                   ^~~~~~~~~~~~~~~~~~~
In file included from ./base/sjbig2.h:25,
                 from ./base/sjbig2.c:26:
/usr/include/jbig2.h:93:11: note: expected 'Jbig2ErrorCallback' {aka 'int (*)(void *, const char *, enum <anonymous>,  int)'} but argument is of type 'void (*)(void *, const char *, Jbig2Severity,  int32_t)' {aka 'void (*)(void *, const char *, enum <anonymous>,  int)'}
 Jbig2Ctx *jbig2_ctx_new(Jbig2Allocator *allocator,
           ^~~~~~~~~~~~~
./base/sjbig2.c:238:21: error: invalid use of void expression
         allocator = (s_jbig2decode_allocator_t *) jbig2_ctx_free(ctx);
                     ^
./base/sjbig2.c: In function 's_jbig2decode_free_global_data':
./base/sjbig2.c:257:17: error: invalid use of void expression
     allocator = (s_jbig2decode_allocator_t *) jbig2_global_ctx_free(global_ctx);
                 ^
./base/sjbig2.c: In function 's_jbig2decode_init':
./base/sjbig2.c:306:42: warning: passing argument 4 of 'jbig2_ctx_new' from incompatible pointer type [-Wincompatible-pointer-types]
                              global_ctx, s_jbig2decode_error, state->callback_data);
                                          ^~~~~~~~~~~~~~~~~~~
In file included from ./base/sjbig2.h:25,
                 from ./base/sjbig2.c:26:
/usr/include/jbig2.h:93:11: note: expected 'Jbig2ErrorCallback' {aka 'int (*)(void *, const char *, enum <anonymous>,  int)'} but argument is of type 'void (*)(void *, const char *, Jbig2Severity,  int32_t)' {aka 'void (*)(void *, const char *, enum <anonymous>,  int)'}
 Jbig2Ctx *jbig2_ctx_new(Jbig2Allocator *allocator,
           ^~~~~~~~~~~~~
./base/sjbig2.c: In function 's_jbig2decode_release':
./base/sjbig2.c:391:21: error: invalid use of void expression
         allocator = (s_jbig2decode_allocator_t *) jbig2_ctx_free(state->decode_ctx);
                     ^
make[2]: *** [base/lib.mak:1780: soobj/sjbig2.o] Error 1
make[2]: Leaving directory '/home/mosvald/Work/redhat/src/ghostscript/fedora/ghostscript/f29/ghostscript-9.27'
make[2]: *** Waiting for unfinished jobs....
make[2]: Entering directory '/home/mosvald/Work/redhat/src/ghostscript/fedora/ghostscript/f29/ghostscript-9.27'
~~~


Expected results:

Ghostscript 9.27 gets compiled cleanly with jbig2dec-devel-0.16-1.fc29:

~~~
make[2]: Entering directory '/home/mosvald/Work/redhat/src/ghostscript/fedora/ghostscript/f29/ghostscript-9.27'
gcc  -DHAVE_MKSTEMP -DHAVE_FILE64 -DHAVE_FSEEKO -DHAVE_MKSTEMP64 -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_SSE2 -DHAVE_DBUS -DHAVE_BSWAP32 -DHAVE_BYTESWAP_H -DHAVE_STRERROR -DHAVE_ISNAN -DHAVE_ISIN
F  -DHAVE_PREAD_PWRITE=1 -DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE -fPIC  -O2 -fPIC \
         -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -fno-strict-aliasing -Werror=declaration-after-statement -fno-builtin -fno-common -Werror=return-type -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_LIBDL=1 -DGX_COLOR_INDEX_TYPE="unsigned long long" -D__USE_UNIX98=1  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DHAVE_RESTRICT=1 -DUSE_LIBPAPER  -fno-strict-aliasing -DHAVE_POPEN_PROTO=1 -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/usr/lib64/ghostscript\"  -I./soobj -I./base -I./devices -Isrc   -o ./soobj/sjbig2.o -c ./base/sjbig2.c
make[2]: Leaving directory '/home/mosvald/Work/redhat/src/ghostscript/fedora/ghostscript/f29/ghostscript-9.27'
~~~

Comment 1 Michael J Gruber 2019-08-16 05:46:14 UTC
0.16 is in rawhide now (thanks for the ping).

Please let me know which Fedora branches you see fit for gs27/jbig2dec - presumably F31, maybe F30, presumably not F29.

Comment 2 Martin Osvald 2019-09-06 13:03:55 UTC
(In reply to Michael J Gruber from comment #1)
> 0.16 is in rawhide now (thanks for the ping).
> 
> Please let me know which Fedora branches you see fit for gs27/jbig2dec -
> presumably F31, maybe F30, presumably not F29.

Thank you for getting 0.16 into rawhide!

Due to the recently opened CVE against fedora:

Bug 1747956 - CVE-2019-3839 ghostscript: missing attack vector protections for CVE-2019-6116 [fedora-all]

It will be best to rebase to Ghostscript 9.27 everywhere (F29-F31) to prevent possible regressions.

The amount of work to get the CVE-2019-3839 fixed on Fedora by backporting the needed patches doesn't outweigh benefits of fixing it by rebasing to 9.27.

More info behind this decision here:

https://bugzilla.redhat.com/show_bug.cgi?id=1747956#c3


So please, rebase jbig2dec also on F29, F30, and F31.

Thank you!

Comment 3 Fedora Update System 2019-09-06 13:34:47 UTC
FEDORA-2019-c8e2c3df22 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-c8e2c3df22

Comment 4 Fedora Update System 2019-09-06 13:35:50 UTC
FEDORA-2019-686ecf43f4 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-686ecf43f4

Comment 5 Fedora Update System 2019-09-06 13:36:35 UTC
FEDORA-2019-55973f4ef8 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-55973f4ef8

Comment 6 Fedora Update System 2019-09-07 16:57:29 UTC
jbig2dec-0.16-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-c8e2c3df22

Comment 7 Fedora Update System 2019-09-08 03:49:31 UTC
jbig2dec-0.16-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-686ecf43f4

Comment 8 Fedora Update System 2019-09-08 05:46:55 UTC
jbig2dec-0.16-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-55973f4ef8

Comment 9 Fedora Update System 2019-09-14 00:10:20 UTC
jbig2dec-0.16-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2019-09-14 16:33:49 UTC
jbig2dec-0.16-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2019-09-16 01:10:20 UTC
jbig2dec-0.16-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2019-09-16 02:20:52 UTC
jbig2dec-0.16-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2020-07-02 10:41:12 UTC
FEDORA-2020-0b9b27eea6 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-0b9b27eea6

Comment 14 Fedora Update System 2020-07-03 01:22:58 UTC
FEDORA-2020-0b9b27eea6 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-0b9b27eea6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-0b9b27eea6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2020-07-11 01:03:38 UTC
FEDORA-2020-0b9b27eea6 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.