Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
It’s been a while.
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ruuuui
September 14, 2017
35
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
It’s been a while.
ruuuui
September 14, 2017
More Decks by ruuuui
See All by ruuuui
TCP/IP
ruuuui
0
63
log
ruuuui
0
62
Malware
ruuuui
0
45
File
ruuuui
0
54
リダイレクト
ruuuui
0
44
a
ruuuui
0
53
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
500
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
580
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Optimizing for Happiness
mojombo
378
71k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
530
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
The Pragmatic Product Professional
lauravandoore
37
7.5k
The agentic SEO stack - context over prompts
schlessera
0
970
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
560
Transcript
ڞ༗ࢿݯʹؔ͢Δ ށݐɹߥҪ ྨ
ϨʔείϯσΟγϣϯ
Race Condition(ڝ߹ঢ়ଶ)ͷ੬ऑੑ ✦ ֓ཁ • ڞ༗ࢿݯͱ ෳͷϓϩηοα͔Βʰಉ࣌ʱʹར༻͍ͯ͠Δ มɾڞ༗ϝϞϦɾDBɾϑΝΠϧͷ͜ͱ ڞ༗ࢿݯʹର͢Δഉଞ੍ޚ͕ෆेͳ߹ ڝ߹ঢ়ଶͷݪҼͱͳΔ
Race Conditionͷදྫ • ผਓͷݸਓใͳͲ͕දࣔ͞ΕΔ • DBͷෆ߹ • ϑΝΠϧ༰ͷഁյ
Πϯελϯεมͱ • ΦϒδΣΫτͷதͰΛอଘ͓ͯͨ͘͠Ίͷར༻͞ΕΔͷ͕ ʮΠϯελϯεมʯͰ͢ɻ • ΠϯελϯεมΫϥεͰશϝιουͰڞ௨ͯ͠༻͢Δ͜ͱ ͕ग़དྷ·͢ɻ • ࠷ॳʹͲ͔͜ͷϝιουͰ༻͞Εͨ࣌ͰΠϯελϯεม࡞ ͞ΕɺҰ࡞͞ΕͨΠϯελϯεมଞͷϝιουͰΛऔ
Γग़ͨ͠Γ֨ೲͨ͠Γ͢Δ͜ͱ͕ग़དྷΔΑ͏ʹͳΓ·͢ɻ
߈ܸख๏ͱӨڹ ӈͷϓϩάϥϜnameจࣈྻΛड͚औͬͯ Πϯελϯεมnameʹೖ͠ɺ̏ඵ·͔ͬͯΒɺ ΠϯελϯεมΛදࣔ͢ΔϓϩάϥϜ
߈ܸख๏ͱӨڹ
• มnameڞ༗ม • ڞ༗มnameͷഉଞ੍ޚΛ͍ͯ͠ͳ͍ ੬ऑੑ͕ੜ·ΕΔݪҼ αʔϒϨοτΫϥεͷΠϯελϯεม͕ ڞ༗ࢿݯͰ͋Δ͜ͱΛΒͳ͍ͱɺىͯ͜͠͠·͏
• ՄೳͰ͋Εڞ༗ࢿݯΛ༻͠ͳ͍ ex. String name = req.getParameter(“name”); • ڞ༗ࢿݯʹରͯ͠ഉଞ੍ޚΛߦ͏ synchronizedจsynchronisedϝιουΛར༻
ରࡦ
yamadaॲཧ tanakaॲཧ 1sec name=“yamada”; ༷ʑͳॲཧ(̏ඵ) nameදࣔ(yamada) SynchronisedʹΑΓػ (̎ඵ) name=“tanaka”; ༷ʑͳॲཧ(̏ඵ)
nameදࣔ(tanaka) 0sec 2sec 3sec 4sec 5sec 6sec
·ͱΊ • ڞ༗ࢿݯͰ͖Δ͚ͩΘͳ͍ • ഉଞॲཧΛ͗ͯ͢͠DoS੬ऑੑΛ࢈ΜͰ͠·͏ͷͰɺ ฒߦॲཧɾϚϧνεϨουϓϩάϥϛϯάΛߦ͏