Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1417424 - NSS_LIBDIR not propagated to ../security/nss.cfg
Summary: NSS_LIBDIR not propagated to ../security/nss.cfg
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.8.0-openjdk
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: jiri vanek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-29 05:50 UTC by Ralf Corsepius
Modified: 2017-12-12 10:37 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1429774 1429775 (view as bug list)
Environment:
Last Closed: 2017-12-12 10:37:54 UTC
Type: Bug


Attachments (Terms of Use)

Description Ralf Corsepius 2017-01-29 05:50:58 UTC
Description of problem:

In /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-5.b16.fc25.x86_64/jre/lib/security/nss.cfg, I see this:
...
nssLibraryDirectory = @NSS_LIBDIR@
...

In java-1.8.0-openjdk.spec, I see this:
%global NSS_LIBDIR %(pkg-config --variable=libdir nss)


I read this, as @NSS_LIBDIR@ in nss.cfg is supposed to be replaced with
/usr/lib64 (rsp. /usr/lib), i.e. a packaging bug. 


Version-Release number of selected component (if applicable):
java-1.8.0-openjdk-headless-1.8.0.111-5.b16.fc25.x86_64

Additional info:
I don't have the faintest clue about the consequences and seriousness of this bug.

Comment 1 Severin Gehwolf 2017-01-30 09:29:43 UTC
Same issue with latest stable packages:

$ grep NSS_LIBDIR /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-1.b14.fc24.x86_64/jre/lib/security/nss.cfg
nssLibraryDirectory = @NSS_LIBDIR@
$ rpm -q java-1.8.0-openjdk
java-1.8.0-openjdk-1.8.0.121-1.b14.fc24.x86_64

Comment 2 Severin Gehwolf 2017-01-30 10:26:44 UTC
Andrew, is this config file needed at all?

Comment 3 jiri vanek 2017-01-30 13:39:52 UTC
There used to be :

# Install nss.cfg right away as we will be using the JRE above
cp -a %{SOURCE8} $JAVA_HOME/jre/lib/security/
sed -i -e s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g $JAVA_HOME/jre/lib/security/nss.cfg

Its somehow no longer there.

Comment 4 jiri vanek 2017-01-30 13:41:09 UTC
s/SOURCE8/SOURCE11 for current version

Comment 5 Andrew John Hughes 2017-03-07 04:18:21 UTC
(In reply to jiri vanek from comment #3)
> There used to be :
> 
> # Install nss.cfg right away as we will be using the JRE above
> cp -a %{SOURCE8} $JAVA_HOME/jre/lib/security/
> sed -i -e s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g $JAVA_HOME/jre/lib/security/nss.cfg
> 
> Its somehow no longer there.

It seems it never made it to java-1.8.0-openjdk at all. The config file was added, but not the substitution nor the addition of the PKCS11 provider to java.security.
It's broken in RHEL's java-1.8.0-openjdk too. java-1.6.0-openjdk is also broken, but in a different way. java-1.7.0-openjdk is the only version that seems to have this correct.

nss.cfg is a configuration file for the PKCS11 provider. It's called by the addition of a line to java.security:

#security.provider.10=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg

However, that's not present in java-1.8.0-openjdk so the file never gets read and thus the invalid contents are never used.

As it's been broken for the entire lifetime of java-1.8.0-openjdk, I suggest just deleting it.

Assigning to Jiri so he can decide whether to delete or fix it in Fedora.

Comment 6 Andrew John Hughes 2017-03-07 04:26:02 UTC
RHEL bugs 1429774 and 1429775 created to fix this in RHEL.

Comment 7 jiri vanek 2017-05-29 08:02:59 UTC
Hi Andrew, just to verify:

When  both java.security contains security.provider.10=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg  *and* nss.xfg is valid, then the list of providers looks like:

SUN
SunRsaSign
SunEC
SunJSSE
SunJCE
SunJGSS
SunSASL
XMLDSig
SunPCSC
SunPKCS11-NSS

When nss.cfg is removed/broken ans still security.provider.10=sun.security.pkcs11.SunPKCS11 is present, then JVM crashes


And when security.provider.10=sun.security.pkcs11.SunPKCS11 is missing, then nss.cfg does nto meter, but the list is SunPKCS11-NSS short.


So imho the jdks are broken a bit, and  security.provider.10=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg should be there and so nss.cfg should be valid.

Thank you for any advice.

Comment 10 Andrew John Hughes 2017-06-06 03:16:44 UTC
(In reply to jiri vanek from comment #7)
> Hi Andrew, just to verify:
> 
> When  both java.security contains
> security.provider.10=sun.security.pkcs11.SunPKCS11
> ${java.home}/lib/security/nss.cfg  *and* nss.xfg is valid, then the list of
> providers looks like:
> 
> SUN
> SunRsaSign
> SunEC
> SunJSSE
> SunJCE
> SunJGSS
> SunSASL
> XMLDSig
> SunPCSC
> SunPKCS11-NSS
> 
> When nss.cfg is removed/broken ans still
> security.provider.10=sun.security.pkcs11.SunPKCS11 is present, then JVM
> crashes
> 
> 
> And when security.provider.10=sun.security.pkcs11.SunPKCS11 is missing, then
> nss.cfg does nto meter, but the list is SunPKCS11-NSS short.
> 
> 
> So imho the jdks are broken a bit, and 
> security.provider.10=sun.security.pkcs11.SunPKCS11
> ${java.home}/lib/security/nss.cfg should be there and so nss.cfg should be
> valid.
> 
> Thank you for any advice.

Not sure what I'm actually being asked...

java-1.7.0-openjdk has the correct setup, with nss.cfg correctly generated and a commented out line in java.security. nss.cfg has also now been fixed in java-1.8.0-openjdk.

That's if you want to follow RHEL and retain these files. I don't think we should drop things mid-stream there, but you have the option of doing that with Fedora instead if you prefer.

Comment 11 jiri vanek 2017-06-06 13:22:30 UTC
The propagation of libdir fixed, and system nss returned back to java.security in commented out state.

Comment 12 jiri vanek 2017-06-06 13:23:45 UTC
(In reply to Andrew John Hughes from comment #10)
> (In reply to jiri vanek from comment #7)
> > Hi Andrew, just to verify:
> > 
> > When  both java.security contains
> > security.provider.10=sun.security.pkcs11.SunPKCS11
> > ${java.home}/lib/security/nss.cfg  *and* nss.xfg is valid, then the list of
> > providers looks like:
...
> 
> Not sure what I'm actually being asked...
> 
> java-1.7.0-openjdk has the correct setup, with nss.cfg correctly generated
> and a commented out line in java.security. nss.cfg has also now been fixed
> in java-1.8.0-openjdk.

Yes, commented out. Why?
> 
> That's if you want to follow RHEL and retain these files. I don't think we
> should drop things mid-stream there, but you have the option of doing that
> with Fedora instead if you prefer.

yes, thats what I wont. Tyvm for confirmation!

Comment 13 Andrew John Hughes 2017-06-09 16:49:08 UTC
(In reply to jiri vanek from comment #12)
> (In reply to Andrew John Hughes from comment #10)
> > (In reply to jiri vanek from comment #7)
> > > Hi Andrew, just to verify:
> > > 
> > > When  both java.security contains
> > > security.provider.10=sun.security.pkcs11.SunPKCS11
> > > ${java.home}/lib/security/nss.cfg  *and* nss.xfg is valid, then the list of
> > > providers looks like:
> ...
> > 
> > Not sure what I'm actually being asked...
> > 
> > java-1.7.0-openjdk has the correct setup, with nss.cfg correctly generated
> > and a commented out line in java.security. nss.cfg has also now been fixed
> > in java-1.8.0-openjdk.
> 
> Yes, commented out. Why?

The memory leak in that provider.

Comment 14 jiri vanek 2017-06-12 11:57:23 UTC
(In reply to Andrew John Hughes from comment #13)
> (In reply to jiri vanek from comment #12)
> > (In reply to Andrew John Hughes from comment #10)
> > > (In reply to jiri vanek from comment #7)
> > > > Hi Andrew, just to verify:
> > > > 
> > > > When  both java.security contains
> > > > security.provider.10=sun.security.pkcs11.SunPKCS11
> > > > ${java.home}/lib/security/nss.cfg  *and* nss.xfg is valid, then the list of
> > > > providers looks like:
> > ...
> > > 
> > > Not sure what I'm actually being asked...
> > > 
> > > java-1.7.0-openjdk has the correct setup, with nss.cfg correctly generated
> > > and a commented out line in java.security. nss.cfg has also now been fixed
> > > in java-1.8.0-openjdk.
> > 
> > Yes, commented out. Why?
> 
> The memory leak in that provider.


So that should be the statement.

Provider is present, is working, but is disabled due to known issue. 

TYVM!

Comment 15 Fedora End Of Life 2017-11-16 18:44:21 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 16 Fedora End Of Life 2017-12-12 10:37:54 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.