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

8278099: two sun/security/pkcs11/Signature tests failed with AssertionError #6656

Closed
wants to merge 1 commit into from

Conversation

valeriepeng
Copy link
Contributor

@valeriepeng valeriepeng commented Dec 2, 2021

Can someone help reviewing this trivial one-line fix? The assert check in CK_MECHANISM.java is too strict and fail unexpectedly when digest-specific PSS signature mechanisms are supported by the underlying PKCS#11 library. The fix is to remove this assert check. No new regression test added with this fix as this is already covered by existing regression tests.

Thanks,
Valerie


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8278099: two sun/security/pkcs11/Signature tests failed with AssertionError

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6656/head:pull/6656
$ git checkout pull/6656

Update a local copy of the PR:
$ git checkout pull/6656
$ git pull https://git.openjdk.java.net/jdk pull/6656/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6656

View PR using the GUI difftool:
$ git pr show -t 6656

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6656.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 2, 2021

👋 Welcome back valeriep! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 2, 2021
@openjdk
Copy link

openjdk bot commented Dec 2, 2021

@valeriepeng The following label will be automatically applied to this pull request:

  • security

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the security security-dev@openjdk.org label Dec 2, 2021
@mlbridge
Copy link

mlbridge bot commented Dec 2, 2021

Webrevs

@wangweij
Copy link
Contributor

wangweij commented Dec 2, 2021

Not a PKCS11 expert, but does a "digest-specific PSS signature mechanism" needs setParameter anymore? Or, must it be the same as the existing parameters dictated by the specified digest?

Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a PKCS11 expert, but the fix does what @valeriepeng describes
in the bug report: removes the offending assert.

Thumbs up.

@openjdk
Copy link

openjdk bot commented Dec 2, 2021

@valeriepeng This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8278099: two sun/security/pkcs11/Signature tests failed with AssertionError

Reviewed-by: dcubed

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 18 new commits pushed to the master branch:

  • 3889af3: 8277906: Incorrect type for IV phi of long counted loops after CCP
  • d2b16c8: 8276126: Dump time class transformation causes heap objects of non-boot classes to be archived
  • 7696897: 8276837: [macos]: Error when signing the additional launcher
  • 3d98ec1: 8273056: java.util.random does not correctly sample exponential or Gaussian distributions
  • b79554b: 8278130: Failure in jdk/javadoc/tool/CheckManPageOptions.java after JDK-8274639
  • ea905bd: 8277924: Small tweaks to foreign function and memory API
  • e002bfe: 8278049: G1: add precondition to set_remainder_to_point_to_start
  • 16cfbc4: 8278071: typos in MemorySegment::set, MemorySegment::setAtIndex javadoc
  • 84ca14d: 8277194: applications/runthese/RunThese30M.java crashes with jfrSymbolTable.cpp:305 assert(_instance != null)
  • 103da8f: 8274639: Provide a way to disable warnings for cross-modular links
  • ... and 8 more: https://git.openjdk.java.net/jdk/compare/f41e768bba2b2ce3b3cc5813ccb1ac4984dcefbd...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 2, 2021
@dcubed-ojdk
Copy link
Member

Have you verified that this fix works on an Oracle_Linux_8.4 test machine?

@dcubed-ojdk
Copy link
Member

And I agree that this is a trivial fix.

@valeriepeng
Copy link
Contributor Author

Not a PKCS11 expert, but does a "digest-specific PSS signature mechanism" needs setParameter anymore? Or, must it be the same as the existing parameters dictated by the specified digest?

Previously when PSS support is added, the NSS library that we have does not support digest-specific PSS signatures. Now that some machine starts failing due to this assert and passes without this assert, it at least confirms that these digest-specific PSS signature mechanisms still work with the setParameter() call. I will take a closer look at these new mechanisms and see if any changes are needed. Best to remove this assert ASAP for a clean tier 2 result...

@valeriepeng
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 2, 2021

Going to push as commit 669c90e.
Since your change was applied there have been 26 commits pushed to the master branch:

  • 4f15be2: 8277965: Enclosing instance optimization affects serialization
  • 8f196a2: 8278037: Clean up PPC32 related code in C1
  • 8b042d1: 8257856: Make ClassFileVersionsTest.java robust to JDK version updates
  • ad1ff27: 8277422: tools/jar/JarEntryTime.java fails with modified time mismatch
  • 7c4ef3a: 8277985: G1: Compare max_parallel_refinement_threads to UINT_MAX
  • dc2abc9: 8278080: Add --with-cacerts-src='user cacerts folder' to enable deterministic cacerts generation
  • 8d9cb2e: 8278078: Cannot reference super before supertype constructor has been called
  • 65960f7: 8277753: Long*VectorTests.java fail with "bad AD file" on x86_32 after JDK-8276162
  • 3889af3: 8277906: Incorrect type for IV phi of long counted loops after CCP
  • d2b16c8: 8276126: Dump time class transformation causes heap objects of non-boot classes to be archived
  • ... and 16 more: https://git.openjdk.java.net/jdk/compare/f41e768bba2b2ce3b3cc5813ccb1ac4984dcefbd...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Dec 2, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 2, 2021
@openjdk
Copy link

openjdk bot commented Dec 2, 2021

@valeriepeng Pushed as commit 669c90e.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated security security-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants