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

Consider types in sun.* package(s) to be JDK (platform) types for purposes of handling #4205

Closed
cowtowncoder opened this issue Nov 15, 2023 · 0 comments
Labels
2.17 Issues planned at earliest for 2.17

Comments

@cowtowncoder
Copy link
Member

cowtowncoder commented Nov 15, 2023

Describe your Issue

(note: follow-up on #4204)

Currently types under java.* and javax.* packages get different (stricter) handling compared to all other types, wrt Reflection-based discovery. This is done for following reasons:

  1. Later JDK versions have stricter access checks, and reducing amount of discovery/access-forcing for JDK types reduces warnings (and sometimes actual failures), without reducing access to User-Provided Types (UPT)
  2. Forced access to Platform types may open up security holes in conjunction with Polymorphic Deserialization -- problematic as they are known to exist and hence much easier to exploit that User-Provided Types. So closing access may improve security as well
  3. JDK types to support mostly already have explicit (de)serializers, so auto-detection is rarely used for actual handling (and can be added for types as needed)

Due to legacy reasons, there are also "well-known" Platform types under some other packages; most notably sun.security (and generally anything under sun.*). For example see #4204.

So, for Jackson 2.17, let's consider adding this set of classes as "platform" (JDK) types for more limited auto-discovery.

@cowtowncoder cowtowncoder added to-evaluate Issue that has been received but not yet evaluated 2.17 Issues planned at earliest for 2.17 and removed to-evaluate Issue that has been received but not yet evaluated labels Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.17 Issues planned at earliest for 2.17
Projects
None yet
Development

No branches or pull requests

1 participant