Check hidden frames in entitlements (#127877)

Entitlements do a stack walk to find the calling class. When method
refences are used in a lambda, the frame ends up hidden in the stack
walk. In the case of using a method reference with
AccessController.doPrivileged, the call looks like it is the jdk itself,
so the call is trivially allowed. This commit adds hidden frames to the
stack walk so that the lambda frame created for the method reference is
included. Several internal packages are then necessary to filter out of
the stack.
This commit is contained in:
Ryan Ernst 2025-05-08 16:59:03 -07:00 committed by GitHub
parent a3700ff598
commit ab690ba23f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 20 additions and 2 deletions

View file

@ -0,0 +1,5 @@
pr: 127877
summary: Check hidden frames in entitlements
area: Infra/Core
type: bug
issues: []