~/talk

Brace for your next Race - Race conditions in Servlets and Controllers

Talkat JCON-ONLINE 2021 · 2021-10-05..10-08· [security, web-platform]
links:none on file
slides:none on file

Demonstrates a real race on a Spring MVC controller and J2EE servlet where a shopping-basket coupon handler subtracts the discount multiple times; a local demo sends ~300 concurrent requests with Turbo Intruder through Burp Suite and observes four wrong responses (examples: 21.87 or even negative totals). Fixes shown include using ReentrantLock, semaphores or synchronized blocks and switching the bean to @Scope("request"); locks eliminate the duplicates but add contention and potential performance costs.

AI-written summary · about

  1. 0:00Introduction
  2. 1:30Survey
  3. 2:17Who am I
  4. 3:09Agenda
  5. 4:16Race conditions
  6. 5:15What are race conditions
  7. 8:07Race conditions in Security
  8. 10:41Coupon application
  9. 14:43Example code
  10. 18:58Running the Trace
  11. 25:21Basket Controller
  12. 29:04Other approaches
  13. 32:23Scope Prototype
  14. 35:32Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.