Closed Bug 2035266 Opened 6 months ago Closed 15 days ago

Add disable_libjar build option and disable libjar by default

Categories

(NSS :: Build, task, P3)

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 2089738

People

(Reporter: beurdouche, Assigned: beurdouche)

Details

Attachments

(1 external file)

lib/jar is legacy code: it implements the historical Mozilla signed-JAR format. The only in-tree consumers are cmd/signtool and the JAR-install command in cmd/modutil (Pk11Install_DoInstall / install.c / installparse.c / lex.Pk11Install_yy.c / install-ds.c / instsec.c).

Recent fuzzing/audit work has surfaced multiple sec-moderate issues in lib/jar (e.g. bug 2031903, bug 2030571, bug 2029798). Rather than carry the maintenance burden, follow the existing pattern used for libpkix and dbm (disable_libpkix, disable_dbm) and add a disable_libjar gyp variable, defaulting to 1 (disabled). Provide --enable-libjar in build.sh for the legacy use case.

Scope:

  • coreconf/config.gypi: add 'disable_libjar%': 1
  • exports.gyp, nss.gyp: gate lib/jar exports/dep on disable_libjar==0
  • cmd/signtool/signtool.gyp: gate target on disable_libjar==0
  • cmd/modutil/modutil.gyp: gate libjar-only sources (install*.c, instsec.c, installparse.c, lex.Pk11Install_yy.c) + jar dep on disable_libjar==0; define NSS_DISABLE_LIBJAR otherwise
  • cmd/modutil/modutil.c: #ifndef NSS_DISABLE_LIBJAR around the Pk11Install_DoInstall call site and the install.h include
  • build.sh: add --enable-libjar to flip disable_libjar=0
Status: ASSIGNED → RESOLVED
Closed: 15 days ago
Duplicate of bug: 2089738
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: