JDK-8289633 : Forbid raw C-heap allocation functions in hotspot and fix findings
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11,17,19,20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-07-03
  • Updated: 2022-07-05
  • Resolved: 2022-07-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20 masterFixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
JDK-8214976 introduced a way to forbid functions from being called outside of explicitly allowed contexts. Kim Barrett proposed [1] to use that functionality to forbid raw malloc and friends. That would have prevented JDK-8289477, where on Alpine the muslc sneaked in raw malloc and free calls via C-runtime defined standard macros.

[1] https://mail.openjdk.org/pipermail/hotspot-dev/2022-July/061602.html
Comments
Changeset: 688712f7 Author: Thomas Stuefe <stuefe@openjdk.org> Date: 2022-07-05 04:26:45 +0000 URL: https://git.openjdk.org/jdk/commit/688712f75cd54caa264494adbe4dfeefc079e1dd
05-07-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/9356 Date: 2022-07-03 08:04:09 +0000
03-07-2022