~/talk

Safely Shoot Yourself in the Foot with Java 9

Talkat J-Fall 2017 · on Thursday, 2017-11-02· [java, security]
links:none on file
slides:none on file

Java 9 removes easy Unsafe access but still allows the same attacks using VarHandles and MethodHandles.privateLookupIn to mutate String byte[] internals and bypass final-field protections; unchecked checked exceptions still appear via Unsafe hacks. Direct ByteBuffer unmapping uses Unsafe.invokeCleaner instead of phantom-cleaner tricks and works but is unsafe. Module flags like --add-exports and -XX:RestrictContended are needed to access @Contended and hidden internals. jshell and stream ops takeWhile/dropWhile ship but parallel semantics can break.

AI-written summary · about

  1. 0:00Introduction and Java 9 overview
  2. 2:14Security improvements in Java 9
  3. 6:06Unsafe class and its risks
  4. 10:41VarHandles replacing Unsafe
  5. 14:12New ways to shoot yourself in the foot
  6. 25:29Modifying private fields with VarHandles
  7. 33:16Unmapping memory buffers in Java 9
  8. 41:51Cleaner API and direct buffers
  9. 45:04Contended annotation and modules
  10. 47:55New stream features and JShell
  11. 50:47JShell for beginners and scripting
  12. 55:29Garbage collection changes in Java 9
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.