rfc4301.txt 256 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659
  1. Network Working Group S. Kent
  2. Request for Comments: 4301 K. Seo
  3. Obsoletes: 2401 BBN Technologies
  4. Category: Standards Track December 2005
  5. Security Architecture for the Internet Protocol
  6. Status of This Memo
  7. This document specifies an Internet standards track protocol for the
  8. Internet community, and requests discussion and suggestions for
  9. improvements. Please refer to the current edition of the "Internet
  10. Official Protocol Standards" (STD 1) for the standardization state
  11. and status of this protocol. Distribution of this memo is unlimited.
  12. Copyright Notice
  13. Copyright (C) The Internet Society (2005).
  14. Abstract
  15. This document describes an updated version of the "Security
  16. Architecture for IP", which is designed to provide security services
  17. for traffic at the IP layer. This document obsoletes RFC 2401
  18. (November 1998).
  19. Dedication
  20. This document is dedicated to the memory of Charlie Lynn, a long-time
  21. senior colleague at BBN, who made very significant contributions to
  22. the IPsec documents.
  23. Kent & Seo Standards Track [Page 1]
  24. RFC 4301 Security Architecture for IP December 2005
  25. Table of Contents
  26. 1. Introduction ....................................................4
  27. 1.1. Summary of Contents of Document ............................4
  28. 1.2. Audience ...................................................4
  29. 1.3. Related Documents ..........................................5
  30. 2. Design Objectives ...............................................5
  31. 2.1. Goals/Objectives/Requirements/Problem Description ..........5
  32. 2.2. Caveats and Assumptions ....................................6
  33. 3. System Overview .................................................7
  34. 3.1. What IPsec Does ............................................7
  35. 3.2. How IPsec Works ............................................9
  36. 3.3. Where IPsec Can Be Implemented ............................10
  37. 4. Security Associations ..........................................11
  38. 4.1. Definition and Scope ......................................12
  39. 4.2. SA Functionality ..........................................16
  40. 4.3. Combining SAs .............................................17
  41. 4.4. Major IPsec Databases .....................................18
  42. 4.4.1. The Security Policy Database (SPD) .................19
  43. 4.4.1.1. Selectors .................................26
  44. 4.4.1.2. Structure of an SPD Entry .................30
  45. 4.4.1.3. More Regarding Fields Associated
  46. with Next Layer Protocols .................32
  47. 4.4.2. Security Association Database (SAD) ................34
  48. 4.4.2.1. Data Items in the SAD .....................36
  49. 4.4.2.2. Relationship between SPD, PFP
  50. flag, packet, and SAD .....................38
  51. 4.4.3. Peer Authorization Database (PAD) ..................43
  52. 4.4.3.1. PAD Entry IDs and Matching Rules ..........44
  53. 4.4.3.2. IKE Peer Authentication Data ..............45
  54. 4.4.3.3. Child SA Authorization Data ...............46
  55. 4.4.3.4. How the PAD Is Used .......................46
  56. 4.5. SA and Key Management .....................................47
  57. 4.5.1. Manual Techniques ..................................48
  58. 4.5.2. Automated SA and Key Management ....................48
  59. 4.5.3. Locating a Security Gateway ........................49
  60. 4.6. SAs and Multicast .........................................50
  61. 5. IP Traffic Processing ..........................................50
  62. 5.1. Outbound IP Traffic Processing
  63. (protected-to-unprotected) ................................52
  64. 5.1.1. Handling an Outbound Packet That Must Be
  65. Discarded ..........................................54
  66. 5.1.2. Header Construction for Tunnel Mode ................55
  67. 5.1.2.1. IPv4: Header Construction for
  68. Tunnel Mode ...............................57
  69. 5.1.2.2. IPv6: Header Construction for
  70. Tunnel Mode ...............................59
  71. 5.2. Processing Inbound IP Traffic (unprotected-to-protected) ..59
  72. Kent & Seo Standards Track [Page 2]
  73. RFC 4301 Security Architecture for IP December 2005
  74. 6. ICMP Processing ................................................63
  75. 6.1. Processing ICMP Error Messages Directed to an
  76. IPsec Implementation ......................................63
  77. 6.1.1. ICMP Error Messages Received on the
  78. Unprotected Side of the Boundary ...................63
  79. 6.1.2. ICMP Error Messages Received on the
  80. Protected Side of the Boundary .....................64
  81. 6.2. Processing Protected, Transit ICMP Error Messages .........64
  82. 7. Handling Fragments (on the protected side of the IPsec
  83. boundary) ......................................................66
  84. 7.1. Tunnel Mode SAs that Carry Initial and Non-Initial
  85. Fragments .................................................67
  86. 7.2. Separate Tunnel Mode SAs for Non-Initial Fragments ........67
  87. 7.3. Stateful Fragment Checking ................................68
  88. 7.4. BYPASS/DISCARD Traffic ....................................69
  89. 8. Path MTU/DF Processing .........................................69
  90. 8.1. DF Bit ....................................................69
  91. 8.2. Path MTU (PMTU) Discovery .................................70
  92. 8.2.1. Propagation of PMTU ................................70
  93. 8.2.2. PMTU Aging .........................................71
  94. 9. Auditing .......................................................71
  95. 10. Conformance Requirements ......................................71
  96. 11. Security Considerations .......................................72
  97. 12. IANA Considerations ...........................................72
  98. 13. Differences from RFC 2401 .....................................72
  99. 14. Acknowledgements ..............................................75
  100. Appendix A: Glossary ..............................................76
  101. Appendix B: Decorrelation .........................................79
  102. B.1. Decorrelation Algorithm ...................................79
  103. Appendix C: ASN.1 for an SPD Entry ................................82
  104. Appendix D: Fragment Handling Rationale ...........................88
  105. D.1. Transport Mode and Fragments ..............................88
  106. D.2. Tunnel Mode and Fragments .................................89
  107. D.3. The Problem of Non-Initial Fragments ......................90
  108. D.4. BYPASS/DISCARD Traffic ....................................93
  109. D.5. Just say no to ports? .....................................94
  110. D.6. Other Suggested Solutions..................................94
  111. D.7. Consistency................................................95
  112. D.8. Conclusions................................................95
  113. Appendix E: Example of Supporting Nested SAs via SPD and
  114. Forwarding Table Entries...............................96
  115. References.........................................................98
  116. Normative References............................................98
  117. Informative References..........................................99
  118. Kent & Seo Standards Track [Page 3]
  119. RFC 4301 Security Architecture for IP December 2005
  120. 1. Introduction
  121. 1.1. Summary of Contents of Document
  122. This document specifies the base architecture for IPsec-compliant
  123. systems. It describes how to provide a set of security services for
  124. traffic at the IP layer, in both the IPv4 [Pos81a] and IPv6 [DH98]
  125. environments. This document describes the requirements for systems
  126. that implement IPsec, the fundamental elements of such systems, and
  127. how the elements fit together and fit into the IP environment. It
  128. also describes the security services offered by the IPsec protocols,
  129. and how these services can be employed in the IP environment. This
  130. document does not address all aspects of the IPsec architecture.
  131. Other documents address additional architectural details in
  132. specialized environments, e.g., use of IPsec in Network Address
  133. Translation (NAT) environments and more comprehensive support for IP
  134. multicast. The fundamental components of the IPsec security
  135. architecture are discussed in terms of their underlying, required
  136. functionality. Additional RFCs (see Section 1.3 for pointers to
  137. other documents) define the protocols in (a), (c), and (d).
  138. a. Security Protocols -- Authentication Header (AH) and
  139. Encapsulating Security Payload (ESP)
  140. b. Security Associations -- what they are and how they work,
  141. how they are managed, associated processing
  142. c. Key Management -- manual and automated (The Internet Key
  143. Exchange (IKE))
  144. d. Cryptographic algorithms for authentication and encryption
  145. This document is not a Security Architecture for the Internet; it
  146. addresses security only at the IP layer, provided through the use of
  147. a combination of cryptographic and protocol security mechanisms.
  148. The spelling "IPsec" is preferred and used throughout this and all
  149. related IPsec standards. All other capitalizations of IPsec (e.g.,
  150. IPSEC, IPSec, ipsec) are deprecated. However, any capitalization of
  151. the sequence of letters "IPsec" should be understood to refer to the
  152. IPsec protocols.
  153. The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
  154. SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this
  155. document, are to be interpreted as described in RFC 2119 [Bra97].
  156. 1.2. Audience
  157. The target audience for this document is primarily individuals who
  158. implement this IP security technology or who architect systems that
  159. will use this technology. Technically adept users of this technology
  160. Kent & Seo Standards Track [Page 4]
  161. RFC 4301 Security Architecture for IP December 2005
  162. (end users or system administrators) also are part of the target
  163. audience. A glossary is provided in Appendix A to help fill in gaps
  164. in background/vocabulary. This document assumes that the reader is
  165. familiar with the Internet Protocol (IP), related networking
  166. technology, and general information system security terms and
  167. concepts.
  168. 1.3. Related Documents
  169. As mentioned above, other documents provide detailed definitions of
  170. some of the components of IPsec and of their interrelationship. They
  171. include RFCs on the following topics:
  172. a. security protocols -- RFCs describing the Authentication
  173. Header (AH) [Ken05b] and Encapsulating Security Payload
  174. (ESP) [Ken05a] protocols.
  175. b. cryptographic algorithms for integrity and encryption -- one
  176. RFC that defines the mandatory, default algorithms for use
  177. with AH and ESP [Eas05], a similar RFC that defines the
  178. mandatory algorithms for use with IKEv2 [Sch05] plus a
  179. separate RFC for each cryptographic algorithm.
  180. c. automatic key management -- RFCs on "The Internet Key
  181. Exchange (IKEv2) Protocol" [Kau05] and "Cryptographic
  182. Algorithms for Use in the Internet Key Exchange Version 2
  183. (IKEv2)" [Sch05].
  184. 2. Design Objectives
  185. 2.1. Goals/Objectives/Requirements/Problem Description
  186. IPsec is designed to provide interoperable, high quality,
  187. cryptographically-based security for IPv4 and IPv6. The set of
  188. security services offered includes access control, connectionless
  189. integrity, data origin authentication, detection and rejection of
  190. replays (a form of partial sequence integrity), confidentiality (via
  191. encryption), and limited traffic flow confidentiality. These
  192. services are provided at the IP layer, offering protection in a
  193. standard fashion for all protocols that may be carried over IP
  194. (including IP itself).
  195. IPsec includes a specification for minimal firewall functionality,
  196. since that is an essential aspect of access control at the IP layer.
  197. Implementations are free to provide more sophisticated firewall
  198. mechanisms, and to implement the IPsec-mandated functionality using
  199. those more sophisticated mechanisms. (Note that interoperability may
  200. suffer if additional firewall constraints on traffic flows are
  201. imposed by an IPsec implementation but cannot be negotiated based on
  202. the traffic selector features defined in this document and negotiated
  203. Kent & Seo Standards Track [Page 5]
  204. RFC 4301 Security Architecture for IP December 2005
  205. via IKEv2.) The IPsec firewall function makes use of the
  206. cryptographically-enforced authentication and integrity provided for
  207. all IPsec traffic to offer better access control than could be
  208. obtained through use of a firewall (one not privy to IPsec internal
  209. parameters) plus separate cryptographic protection.
  210. Most of the security services are provided through use of two traffic
  211. security protocols, the Authentication Header (AH) and the
  212. Encapsulating Security Payload (ESP), and through the use of
  213. cryptographic key management procedures and protocols. The set of
  214. IPsec protocols employed in a context, and the ways in which they are
  215. employed, will be determined by the users/administrators in that
  216. context. It is the goal of the IPsec architecture to ensure that
  217. compliant implementations include the services and management
  218. interfaces needed to meet the security requirements of a broad user
  219. population.
  220. When IPsec is correctly implemented and deployed, it ought not
  221. adversely affect users, hosts, and other Internet components that do
  222. not employ IPsec for traffic protection. IPsec security protocols
  223. (AH and ESP, and to a lesser extent, IKE) are designed to be
  224. cryptographic algorithm independent. This modularity permits
  225. selection of different sets of cryptographic algorithms as
  226. appropriate, without affecting the other parts of the implementation.
  227. For example, different user communities may select different sets of
  228. cryptographic algorithms (creating cryptographically-enforced
  229. cliques) if required.
  230. To facilitate interoperability in the global Internet, a set of
  231. default cryptographic algorithms for use with AH and ESP is specified
  232. in [Eas05] and a set of mandatory-to-implement algorithms for IKEv2
  233. is specified in [Sch05]. [Eas05] and [Sch05] will be periodically
  234. updated to keep pace with computational and cryptologic advances. By
  235. specifying these algorithms in documents that are separate from the
  236. AH, ESP, and IKEv2 specifications, these algorithms can be updated or
  237. replaced without affecting the standardization progress of the rest
  238. of the IPsec document suite. The use of these cryptographic
  239. algorithms, in conjunction with IPsec traffic protection and key
  240. management protocols, is intended to permit system and application
  241. developers to deploy high quality, Internet-layer, cryptographic
  242. security technology.
  243. 2.2. Caveats and Assumptions
  244. The suite of IPsec protocols and associated default cryptographic
  245. algorithms are designed to provide high quality security for Internet
  246. traffic. However, the security offered by use of these protocols
  247. ultimately depends on the quality of their implementation, which is
  248. Kent & Seo Standards Track [Page 6]
  249. RFC 4301 Security Architecture for IP December 2005
  250. outside the scope of this set of standards. Moreover, the security
  251. of a computer system or network is a function of many factors,
  252. including personnel, physical, procedural, compromising emanations,
  253. and computer security practices. Thus, IPsec is only one part of an
  254. overall system security architecture.
  255. Finally, the security afforded by the use of IPsec is critically
  256. dependent on many aspects of the operating environment in which the
  257. IPsec implementation executes. For example, defects in OS security,
  258. poor quality of random number sources, sloppy system management
  259. protocols and practices, etc., can all degrade the security provided
  260. by IPsec. As above, none of these environmental attributes are
  261. within the scope of this or other IPsec standards.
  262. 3. System Overview
  263. This section provides a high level description of how IPsec works,
  264. the components of the system, and how they fit together to provide
  265. the security services noted above. The goal of this description is
  266. to enable the reader to "picture" the overall process/system, see how
  267. it fits into the IP environment, and to provide context for later
  268. sections of this document, which describe each of the components in
  269. more detail.
  270. An IPsec implementation operates in a host, as a security gateway
  271. (SG), or as an independent device, affording protection to IP
  272. traffic. (A security gateway is an intermediate system implementing
  273. IPsec, e.g., a firewall or router that has been IPsec-enabled.) More
  274. detail on these classes of implementations is provided later, in
  275. Section 3.3. The protection offered by IPsec is based on requirements
  276. defined by a Security Policy Database (SPD) established and
  277. maintained by a user or system administrator, or by an application
  278. operating within constraints established by either of the above. In
  279. general, packets are selected for one of three processing actions
  280. based on IP and next layer header information ("Selectors", Section
  281. 4.4.1.1) matched against entries in the SPD. Each packet is either
  282. PROTECTed using IPsec security services, DISCARDed, or allowed to
  283. BYPASS IPsec protection, based on the applicable SPD policies
  284. identified by the Selectors.
  285. 3.1. What IPsec Does
  286. IPsec creates a boundary between unprotected and protected
  287. interfaces, for a host or a network (see Figure 1 below). Traffic
  288. traversing the boundary is subject to the access controls specified
  289. by the user or administrator responsible for the IPsec configuration.
  290. These controls indicate whether packets cross the boundary unimpeded,
  291. are afforded security services via AH or ESP, or are discarded.
  292. Kent & Seo Standards Track [Page 7]
  293. RFC 4301 Security Architecture for IP December 2005
  294. IPsec security services are offered at the IP layer through selection
  295. of appropriate security protocols, cryptographic algorithms, and
  296. cryptographic keys. IPsec can be used to protect one or more "paths"
  297. (a) between a pair of hosts, (b) between a pair of security gateways,
  298. or (c) between a security gateway and a host. A compliant host
  299. implementation MUST support (a) and (c) and a compliant security
  300. gateway must support all three of these forms of connectivity, since
  301. under certain circumstances a security gateway acts as a host.
  302. Unprotected
  303. ^ ^
  304. | |
  305. +-------------|-------|-------+
  306. | +-------+ | | |
  307. | |Discard|<--| V |
  308. | +-------+ |B +--------+ |
  309. ................|y..| AH/ESP |..... IPsec Boundary
  310. | +---+ |p +--------+ |
  311. | |IKE|<----|a ^ |
  312. | +---+ |s | |
  313. | +-------+ |s | |
  314. | |Discard|<--| | |
  315. | +-------+ | | |
  316. +-------------|-------|-------+
  317. | |
  318. V V
  319. Protected
  320. Figure 1. Top Level IPsec Processing Model
  321. In this diagram, "unprotected" refers to an interface that might also
  322. be described as "black" or "ciphertext". Here, "protected" refers to
  323. an interface that might also be described as "red" or "plaintext".
  324. The protected interface noted above may be internal, e.g., in a host
  325. implementation of IPsec, the protected interface may link to a socket
  326. layer interface presented by the OS. In this document, the term
  327. "inbound" refers to traffic entering an IPsec implementation via the
  328. unprotected interface or emitted by the implementation on the
  329. unprotected side of the boundary and directed towards the protected
  330. interface. The term "outbound" refers to traffic entering the
  331. implementation via the protected interface, or emitted by the
  332. implementation on the protected side of the boundary and directed
  333. toward the unprotected interface. An IPsec implementation may
  334. support more than one interface on either or both sides of the
  335. boundary.
  336. Kent & Seo Standards Track [Page 8]
  337. RFC 4301 Security Architecture for IP December 2005
  338. Note the facilities for discarding traffic on either side of the
  339. IPsec boundary, the BYPASS facility that allows traffic to transit
  340. the boundary without cryptographic protection, and the reference to
  341. IKE as a protected-side key and security management function.
  342. IPsec optionally supports negotiation of IP compression [SMPT01],
  343. motivated in part by the observation that when encryption is employed
  344. within IPsec, it prevents effective compression by lower protocol
  345. layers.
  346. 3.2. How IPsec Works
  347. IPsec uses two protocols to provide traffic security services --
  348. Authentication Header (AH) and Encapsulating Security Payload (ESP).
  349. Both protocols are described in detail in their respective RFCs
  350. [Ken05b, Ken05a]. IPsec implementations MUST support ESP and MAY
  351. support AH. (Support for AH has been downgraded to MAY because
  352. experience has shown that there are very few contexts in which ESP
  353. cannot provide the requisite security services. Note that ESP can be
  354. used to provide only integrity, without confidentiality, making it
  355. comparable to AH in most contexts.)
  356. o The IP Authentication Header (AH) [Ken05b] offers integrity and
  357. data origin authentication, with optional (at the discretion of
  358. the receiver) anti-replay features.
  359. o The Encapsulating Security Payload (ESP) protocol [Ken05a] offers
  360. the same set of services, and also offers confidentiality. Use of
  361. ESP to provide confidentiality without integrity is NOT
  362. RECOMMENDED. When ESP is used with confidentiality enabled, there
  363. are provisions for limited traffic flow confidentiality, i.e.,
  364. provisions for concealing packet length, and for facilitating
  365. efficient generation and discard of dummy packets. This
  366. capability is likely to be effective primarily in virtual private
  367. network (VPN) and overlay network contexts.
  368. o Both AH and ESP offer access control, enforced through the
  369. distribution of cryptographic keys and the management of traffic
  370. flows as dictated by the Security Policy Database (SPD, Section
  371. 4.4.1).
  372. These protocols may be applied individually or in combination with
  373. each other to provide IPv4 and IPv6 security services. However, most
  374. security requirements can be met through the use of ESP by itself.
  375. Each protocol supports two modes of use: transport mode and tunnel
  376. mode. In transport mode, AH and ESP provide protection primarily for
  377. Kent & Seo Standards Track [Page 9]
  378. RFC 4301 Security Architecture for IP December 2005
  379. next layer protocols; in tunnel mode, AH and ESP are applied to
  380. tunneled IP packets. The differences between the two modes are
  381. discussed in Section 4.1.
  382. IPsec allows the user (or system administrator) to control the
  383. granularity at which a security service is offered. For example, one
  384. can create a single encrypted tunnel to carry all the traffic between
  385. two security gateways, or a separate encrypted tunnel can be created
  386. for each TCP connection between each pair of hosts communicating
  387. across these gateways. IPsec, through the SPD management paradigm,
  388. incorporates facilities for specifying:
  389. o which security protocol (AH or ESP) to employ, the mode (transport
  390. or tunnel), security service options, what cryptographic
  391. algorithms to use, and in what combinations to use the specified
  392. protocols and services, and
  393. o the granularity at which protection should be applied.
  394. Because most of the security services provided by IPsec require the
  395. use of cryptographic keys, IPsec relies on a separate set of
  396. mechanisms for putting these keys in place. This document requires
  397. support for both manual and automated distribution of keys. It
  398. specifies a specific public-key based approach (IKEv2 [Kau05]) for
  399. automated key management, but other automated key distribution
  400. techniques MAY be used.
  401. Note: This document mandates support for several features for which
  402. support is available in IKEv2 but not in IKEv1, e.g., negotiation of
  403. an SA representing ranges of local and remote ports or negotiation of
  404. multiple SAs with the same selectors. Therefore, this document
  405. assumes use of IKEv2 or a key and security association management
  406. system with comparable features.
  407. 3.3. Where IPsec Can Be Implemented
  408. There are many ways in which IPsec may be implemented in a host, or
  409. in conjunction with a router or firewall to create a security
  410. gateway, or as an independent security device.
  411. a. IPsec may be integrated into the native IP stack. This requires
  412. access to the IP source code and is applicable to both hosts and
  413. security gateways, although native host implementations benefit
  414. the most from this strategy, as explained later (Section 4.4.1,
  415. paragraph 6; Section 4.4.1.1, last paragraph).
  416. Kent & Seo Standards Track [Page 10]
  417. RFC 4301 Security Architecture for IP December 2005
  418. b. In a "bump-in-the-stack" (BITS) implementation, IPsec is
  419. implemented "underneath" an existing implementation of an IP
  420. protocol stack, between the native IP and the local network
  421. drivers. Source code access for the IP stack is not required in
  422. this context, making this implementation approach appropriate for
  423. use with legacy systems. This approach, when it is adopted, is
  424. usually employed in hosts.
  425. c. The use of a dedicated, inline security protocol processor is a
  426. common design feature of systems used by the military, and of some
  427. commercial systems as well. It is sometimes referred to as a
  428. "bump-in-the-wire" (BITW) implementation. Such implementations
  429. may be designed to serve either a host or a gateway. Usually, the
  430. BITW device is itself IP addressable. When supporting a single
  431. host, it may be quite analogous to a BITS implementation, but in
  432. supporting a router or firewall, it must operate like a security
  433. gateway.
  434. This document often talks in terms of use of IPsec by a host or a
  435. security gateway, without regard to whether the implementation is
  436. native, BITS, or BITW. When the distinctions among these
  437. implementation options are significant, the document makes reference
  438. to specific implementation approaches.
  439. A host implementation of IPsec may appear in devices that might not
  440. be viewed as "hosts". For example, a router might employ IPsec to
  441. protect routing protocols (e.g., BGP) and management functions (e.g.,
  442. Telnet), without affecting subscriber traffic traversing the router.
  443. A security gateway might employ separate IPsec implementations to
  444. protect its management traffic and subscriber traffic. The
  445. architecture described in this document is very flexible. For
  446. example, a computer with a full-featured, compliant, native OS IPsec
  447. implementation should be capable of being configured to protect
  448. resident (host) applications and to provide security gateway
  449. protection for traffic traversing the computer. Such configuration
  450. would make use of the forwarding tables and the SPD selection
  451. function described in Sections 5.1 and 5.2.
  452. 4. Security Associations
  453. This section defines Security Association management requirements for
  454. all IPv6 implementations and for those IPv4 implementations that
  455. implement AH, ESP, or both AH and ESP. The concept of a "Security
  456. Association" (SA) is fundamental to IPsec. Both AH and ESP make use
  457. of SAs, and a major function of IKE is the establishment and
  458. maintenance of SAs. All implementations of AH or ESP MUST support
  459. the concept of an SA as described below. The remainder of this
  460. Kent & Seo Standards Track [Page 11]
  461. RFC 4301 Security Architecture for IP December 2005
  462. section describes various aspects of SA management, defining required
  463. characteristics for SA policy management and SA management
  464. techniques.
  465. 4.1. Definition and Scope
  466. An SA is a simplex "connection" that affords security services to the
  467. traffic carried by it. Security services are afforded to an SA by
  468. the use of AH, or ESP, but not both. If both AH and ESP protection
  469. are applied to a traffic stream, then two SAs must be created and
  470. coordinated to effect protection through iterated application of the
  471. security protocols. To secure typical, bi-directional communication
  472. between two IPsec-enabled systems, a pair of SAs (one in each
  473. direction) is required. IKE explicitly creates SA pairs in
  474. recognition of this common usage requirement.
  475. For an SA used to carry unicast traffic, the Security Parameters
  476. Index (SPI) by itself suffices to specify an SA. (For information on
  477. the SPI, see Appendix A and the AH and ESP specifications [Ken05b,
  478. Ken05a].) However, as a local matter, an implementation may choose
  479. to use the SPI in conjunction with the IPsec protocol type (AH or
  480. ESP) for SA identification. If an IPsec implementation supports
  481. multicast, then it MUST support multicast SAs using the algorithm
  482. below for mapping inbound IPsec datagrams to SAs. Implementations
  483. that support only unicast traffic need not implement this de-
  484. multiplexing algorithm.
  485. In many secure multicast architectures, e.g., [RFC3740], a central
  486. Group Controller/Key Server unilaterally assigns the Group Security
  487. Association's (GSA's) SPI. This SPI assignment is not negotiated or
  488. coordinated with the key management (e.g., IKE) subsystems that
  489. reside in the individual end systems that constitute the group.
  490. Consequently, it is possible that a GSA and a unicast SA can
  491. simultaneously use the same SPI. A multicast-capable IPsec
  492. implementation MUST correctly de-multiplex inbound traffic even in
  493. the context of SPI collisions.
  494. Each entry in the SA Database (SAD) (Section 4.4.2) must indicate
  495. whether the SA lookup makes use of the destination IP address, or the
  496. destination and source IP addresses, in addition to the SPI. For
  497. multicast SAs, the protocol field is not employed for SA lookups.
  498. For each inbound, IPsec-protected packet, an implementation must
  499. conduct its search of the SAD such that it finds the entry that
  500. matches the "longest" SA identifier. In this context, if two or more
  501. SAD entries match based on the SPI value, then the entry that also
  502. matches based on destination address, or destination and source
  503. address (as indicated in the SAD entry) is the "longest" match. This
  504. implies a logical ordering of the SAD search as follows:
  505. Kent & Seo Standards Track [Page 12]
  506. RFC 4301 Security Architecture for IP December 2005
  507. 1. Search the SAD for a match on the combination of SPI,
  508. destination address, and source address. If an SAD entry
  509. matches, then process the inbound packet with that
  510. matching SAD entry. Otherwise, proceed to step 2.
  511. 2. Search the SAD for a match on both SPI and destination address.
  512. If the SAD entry matches, then process the inbound packet
  513. with that matching SAD entry. Otherwise, proceed to step 3.
  514. 3. Search the SAD for a match on only SPI if the receiver has
  515. chosen to maintain a single SPI space for AH and ESP, and on
  516. both SPI and protocol, otherwise. If an SAD entry matches,
  517. then process the inbound packet with that matching SAD entry.
  518. Otherwise, discard the packet and log an auditable event.
  519. In practice, an implementation may choose any method (or none at all)
  520. to accelerate this search, although its externally visible behavior
  521. MUST be functionally equivalent to having searched the SAD in the
  522. above order. For example, a software-based implementation could
  523. index into a hash table by the SPI. The SAD entries in each hash
  524. table bucket's linked list could be kept sorted to have those SAD
  525. entries with the longest SA identifiers first in that linked list.
  526. Those SAD entries having the shortest SA identifiers could be sorted
  527. so that they are the last entries in the linked list. A
  528. hardware-based implementation may be able to effect the longest match
  529. search intrinsically, using commonly available Ternary
  530. Content-Addressable Memory (TCAM) features.
  531. The indication of whether source and destination address matching is
  532. required to map inbound IPsec traffic to SAs MUST be set either as a
  533. side effect of manual SA configuration or via negotiation using an SA
  534. management protocol, e.g., IKE or Group Domain of Interpretation
  535. (GDOI) [RFC3547]. Typically, Source-Specific Multicast (SSM) [HC03]
  536. groups use a 3-tuple SA identifier composed of an SPI, a destination
  537. multicast address, and source address. An Any-Source Multicast group
  538. SA requires only an SPI and a destination multicast address as an
  539. identifier.
  540. If different classes of traffic (distinguished by Differentiated
  541. Services Code Point (DSCP) bits [NiBlBaBL98], [Gro02]) are sent on
  542. the same SA, and if the receiver is employing the optional
  543. anti-replay feature available in both AH and ESP, this could result
  544. in inappropriate discarding of lower priority packets due to the
  545. windowing mechanism used by this feature. Therefore, a sender SHOULD
  546. put traffic of different classes, but with the same selector values,
  547. on different SAs to support Quality of Service (QoS) appropriately.
  548. To permit this, the IPsec implementation MUST permit establishment
  549. and maintenance of multiple SAs between a given sender and receiver,
  550. Kent & Seo Standards Track [Page 13]
  551. RFC 4301 Security Architecture for IP December 2005
  552. with the same selectors. Distribution of traffic among these
  553. parallel SAs to support QoS is locally determined by the sender and
  554. is not negotiated by IKE. The receiver MUST process the packets from
  555. the different SAs without prejudice. These requirements apply to
  556. both transport and tunnel mode SAs. In the case of tunnel mode SAs,
  557. the DSCP values in question appear in the inner IP header. In
  558. transport mode, the DSCP value might change en route, but this should
  559. not cause problems with respect to IPsec processing since the value
  560. is not employed for SA selection and MUST NOT be checked as part of
  561. SA/packet validation. However, if significant re-ordering of packets
  562. occurs in an SA, e.g., as a result of changes to DSCP values en
  563. route, this may trigger packet discarding by a receiver due to
  564. application of the anti-replay mechanism.
  565. DISCUSSION: Although the DSCP [NiBlBaBL98, Gro02] and Explicit
  566. Congestion Notification (ECN) [RaFlBl01] fields are not "selectors",
  567. as that term in used in this architecture, the sender will need a
  568. mechanism to direct packets with a given (set of) DSCP values to the
  569. appropriate SA. This mechanism might be termed a "classifier".
  570. As noted above, two types of SAs are defined: transport mode and
  571. tunnel mode. IKE creates pairs of SAs, so for simplicity, we choose
  572. to require that both SAs in a pair be of the same mode, transport or
  573. tunnel.
  574. A transport mode SA is an SA typically employed between a pair of
  575. hosts to provide end-to-end security services. When security is
  576. desired between two intermediate systems along a path (vs. end-to-end
  577. use of IPsec), transport mode MAY be used between security gateways
  578. or between a security gateway and a host. In the case where
  579. transport mode is used between security gateways or between a
  580. security gateway and a host, transport mode may be used to support
  581. in-IP tunneling (e.g., IP-in-IP [Per96] or Generic Routing
  582. Encapsulation (GRE) tunneling [FaLiHaMeTr00] or dynamic routing
  583. [ToEgWa04]) over transport mode SAs. To clarify, the use of
  584. transport mode by an intermediate system (e.g., a security gateway)
  585. is permitted only when applied to packets whose source address (for
  586. outbound packets) or destination address (for inbound packets) is an
  587. address belonging to the intermediate system itself. The access
  588. control functions that are an important part of IPsec are
  589. significantly limited in this context, as they cannot be applied to
  590. the end-to-end headers of the packets that traverse a transport mode
  591. SA used in this fashion. Thus, this way of using transport mode
  592. should be evaluated carefully before being employed in a specific
  593. context.
  594. Kent & Seo Standards Track [Page 14]
  595. RFC 4301 Security Architecture for IP December 2005
  596. In IPv4, a transport mode security protocol header appears
  597. immediately after the IP header and any options, and before any next
  598. layer protocols (e.g., TCP or UDP). In IPv6, the security protocol
  599. header appears after the base IP header and selected extension
  600. headers, but may appear before or after destination options; it MUST
  601. appear before next layer protocols (e.g., TCP, UDP, Stream Control
  602. Transmission Protocol (SCTP)). In the case of ESP, a transport mode
  603. SA provides security services only for these next layer protocols,
  604. not for the IP header or any extension headers preceding the ESP
  605. header. In the case of AH, the protection is also extended to
  606. selected portions of the IP header preceding it, selected portions of
  607. extension headers, and selected options (contained in the IPv4
  608. header, IPv6 Hop-by-Hop extension header, or IPv6 Destination
  609. extension headers). For more details on the coverage afforded by AH,
  610. see the AH specification [Ken05b].
  611. A tunnel mode SA is essentially an SA applied to an IP tunnel, with
  612. the access controls applied to the headers of the traffic inside the
  613. tunnel. Two hosts MAY establish a tunnel mode SA between themselves.
  614. Aside from the two exceptions below, whenever either end of a
  615. security association is a security gateway, the SA MUST be tunnel
  616. mode. Thus, an SA between two security gateways is typically a
  617. tunnel mode SA, as is an SA between a host and a security gateway.
  618. The two exceptions are as follows.
  619. o Where traffic is destined for a security gateway, e.g., Simple
  620. Network Management Protocol (SNMP) commands, the security gateway
  621. is acting as a host and transport mode is allowed. In this case,
  622. the SA terminates at a host (management) function within a
  623. security gateway and thus merits different treatment.
  624. o As noted above, security gateways MAY support a transport mode SA
  625. to provide security for IP traffic between two intermediate
  626. systems along a path, e.g., between a host and a security gateway
  627. or between two security gateways.
  628. Several concerns motivate the use of tunnel mode for an SA involving
  629. a security gateway. For example, if there are multiple paths (e.g.,
  630. via different security gateways) to the same destination behind a
  631. security gateway, it is important that an IPsec packet be sent to the
  632. security gateway with which the SA was negotiated. Similarly, a
  633. packet that might be fragmented en route must have all the fragments
  634. delivered to the same IPsec instance for reassembly prior to
  635. cryptographic processing. Also, when a fragment is processed by
  636. IPsec and transmitted, then fragmented en route, it is critical that
  637. there be inner and outer headers to retain the fragmentation state
  638. data for the pre- and post-IPsec packet formats. Hence there are
  639. several reasons for employing tunnel mode when either end of an SA is
  640. Kent & Seo Standards Track [Page 15]
  641. RFC 4301 Security Architecture for IP December 2005
  642. a security gateway. (Use of an IP-in-IP tunnel in conjunction with
  643. transport mode can also address these fragmentation issues. However,
  644. this configuration limits the ability of IPsec to enforce access
  645. control policies on traffic.)
  646. Note: AH and ESP cannot be applied using transport mode to IPv4
  647. packets that are fragments. Only tunnel mode can be employed in such
  648. cases. For IPv6, it would be feasible to carry a plaintext fragment
  649. on a transport mode SA; however, for simplicity, this restriction
  650. also applies to IPv6 packets. See Section 7 for more details on
  651. handling plaintext fragments on the protected side of the IPsec
  652. barrier.
  653. For a tunnel mode SA, there is an "outer" IP header that specifies
  654. the IPsec processing source and destination, plus an "inner" IP
  655. header that specifies the (apparently) ultimate source and
  656. destination for the packet. The security protocol header appears
  657. after the outer IP header, and before the inner IP header. If AH is
  658. employed in tunnel mode, portions of the outer IP header are afforded
  659. protection (as above), as well as all of the tunneled IP packet
  660. (i.e., all of the inner IP header is protected, as well as next layer
  661. protocols). If ESP is employed, the protection is afforded only to
  662. the tunneled packet, not to the outer header.
  663. In summary,
  664. a) A host implementation of IPsec MUST support both transport and
  665. tunnel mode. This is true for native, BITS, and BITW
  666. implementations for hosts.
  667. b) A security gateway MUST support tunnel mode and MAY support
  668. transport mode. If it supports transport mode, that should be
  669. used only when the security gateway is acting as a host, e.g., for
  670. network management, or to provide security between two
  671. intermediate systems along a path.
  672. 4.2. SA Functionality
  673. The set of security services offered by an SA depends on the security
  674. protocol selected, the SA mode, the endpoints of the SA, and the
  675. election of optional services within the protocol.
  676. For example, both AH and ESP offer integrity and authentication
  677. services, but the coverage differs for each protocol and differs for
  678. transport vs. tunnel mode. If the integrity of an IPv4 option or
  679. IPv6 extension header must be protected en route between sender and
  680. receiver, AH can provide this service, except for IP or extension
  681. headers that may change in a fashion not predictable by the sender.
  682. Kent & Seo Standards Track [Page 16]
  683. RFC 4301 Security Architecture for IP December 2005
  684. However, the same security may be achieved in some contexts by
  685. applying ESP to a tunnel carrying a packet.
  686. The granularity of access control provided is determined by the
  687. choice of the selectors that define each SA. Moreover, the
  688. authentication means employed by IPsec peers, e.g., during creation
  689. of an IKE (vs. child) SA also affects the granularity of the access
  690. control afforded.
  691. If confidentiality is selected, then an ESP (tunnel mode) SA between
  692. two security gateways can offer partial traffic flow confidentiality.
  693. The use of tunnel mode allows the inner IP headers to be encrypted,
  694. concealing the identities of the (ultimate) traffic source and
  695. destination. Moreover, ESP payload padding also can be invoked to
  696. hide the size of the packets, further concealing the external
  697. characteristics of the traffic. Similar traffic flow confidentiality
  698. services may be offered when a mobile user is assigned a dynamic IP
  699. address in a dialup context, and establishes a (tunnel mode) ESP SA
  700. to a corporate firewall (acting as a security gateway). Note that
  701. fine-granularity SAs generally are more vulnerable to traffic
  702. analysis than coarse-granularity ones that are carrying traffic from
  703. many subscribers.
  704. Note: A compliant implementation MUST NOT allow instantiation of an
  705. ESP SA that employs both NULL encryption and no integrity algorithm.
  706. An attempt to negotiate such an SA is an auditable event by both
  707. initiator and responder. The audit log entry for this event SHOULD
  708. include the current date/time, local IKE IP address, and remote IKE
  709. IP address. The initiator SHOULD record the relevant SPD entry.
  710. 4.3. Combining SAs
  711. This document does not require support for nested security
  712. associations or for what RFC 2401 [RFC2401] called "SA bundles".
  713. These features still can be effected by appropriate configuration of
  714. both the SPD and the local forwarding functions (for inbound and
  715. outbound traffic), but this capability is outside of the IPsec module
  716. and thus the scope of this specification. As a result, management of
  717. nested/bundled SAs is potentially more complex and less assured than
  718. under the model implied by RFC 2401 [RFC2401]. An implementation
  719. that provides support for nested SAs SHOULD provide a management
  720. interface that enables a user or administrator to express the nesting
  721. requirement, and then create the appropriate SPD entries and
  722. forwarding table entries to effect the requisite processing. (See
  723. Appendix E for an example of how to configure nested SAs.)
  724. Kent & Seo Standards Track [Page 17]
  725. RFC 4301 Security Architecture for IP December 2005
  726. 4.4. Major IPsec Databases
  727. Many of the details associated with processing IP traffic in an IPsec
  728. implementation are largely a local matter, not subject to
  729. standardization. However, some external aspects of the processing
  730. must be standardized to ensure interoperability and to provide a
  731. minimum management capability that is essential for productive use of
  732. IPsec. This section describes a general model for processing IP
  733. traffic relative to IPsec functionality, in support of these
  734. interoperability and functionality goals. The model described below
  735. is nominal; implementations need not match details of this model as
  736. presented, but the external behavior of implementations MUST
  737. correspond to the externally observable characteristics of this model
  738. in order to be compliant.
  739. There are three nominal databases in this model: the Security Policy
  740. Database (SPD), the Security Association Database (SAD), and the Peer
  741. Authorization Database (PAD). The first specifies the policies that
  742. determine the disposition of all IP traffic inbound or outbound from
  743. a host or security gateway (Section 4.4.1). The second database
  744. contains parameters that are associated with each established (keyed)
  745. SA (Section 4.4.2). The third database, the PAD, provides a link
  746. between an SA management protocol (such as IKE) and the SPD (Section
  747. 4.4.3).
  748. Multiple Separate IPsec Contexts
  749. If an IPsec implementation acts as a security gateway for multiple
  750. subscribers, it MAY implement multiple separate IPsec contexts.
  751. Each context MAY have and MAY use completely independent
  752. identities, policies, key management SAs, and/or IPsec SAs. This
  753. is for the most part a local implementation matter. However, a
  754. means for associating inbound (SA) proposals with local contexts
  755. is required. To this end, if supported by the key management
  756. protocol in use, context identifiers MAY be conveyed from
  757. initiator to responder in the signaling messages, with the result
  758. that IPsec SAs are created with a binding to a particular context.
  759. For example, a security gateway that provides VPN service to
  760. multiple customers will be able to associate each customer's
  761. traffic with the correct VPN.
  762. Forwarding vs Security Decisions
  763. The IPsec model described here embodies a clear separation between
  764. forwarding (routing) and security decisions, to accommodate a wide
  765. range of contexts where IPsec may be employed. Forwarding may be
  766. trivial, in the case where there are only two interfaces, or it
  767. may be complex, e.g., if the context in which IPsec is implemented
  768. Kent & Seo Standards Track [Page 18]
  769. RFC 4301 Security Architecture for IP December 2005
  770. employs a sophisticated forwarding function. IPsec assumes only
  771. that outbound and inbound traffic that has passed through IPsec
  772. processing is forwarded in a fashion consistent with the context
  773. in which IPsec is implemented. Support for nested SAs is
  774. optional; if required, it requires coordination between forwarding
  775. tables and SPD entries to cause a packet to traverse the IPsec
  776. boundary more than once.
  777. "Local" vs "Remote"
  778. In this document, with respect to IP addresses and ports, the
  779. terms "Local" and "Remote" are used for policy rules. "Local"
  780. refers to the entity being protected by an IPsec implementation,
  781. i.e., the "source" address/port of outbound packets or the
  782. "destination" address/port of inbound packets. "Remote" refers to
  783. a peer entity or peer entities. The terms "source" and
  784. "destination" are used for packet header fields.
  785. "Non-initial" vs "Initial" Fragments
  786. Throughout this document, the phrase "non-initial fragments" is
  787. used to mean fragments that do not contain all of the selector
  788. values that may be needed for access control (e.g., they might not
  789. contain Next Layer Protocol, source and destination ports, ICMP
  790. message type/code, Mobility Header type). And the phrase "initial
  791. fragment" is used to mean a fragment that contains all the
  792. selector values needed for access control. However, it should be
  793. noted that for IPv6, which fragment contains the Next Layer
  794. Protocol and ports (or ICMP message type/code or Mobility Header
  795. type [Mobip]) will depend on the kind and number of extension
  796. headers present. The "initial fragment" might not be the first
  797. fragment, in this context.
  798. 4.4.1. The Security Policy Database (SPD)
  799. An SA is a management construct used to enforce security policy for
  800. traffic crossing the IPsec boundary. Thus, an essential element of
  801. SA processing is an underlying Security Policy Database (SPD) that
  802. specifies what services are to be offered to IP datagrams and in what
  803. fashion. The form of the database and its interface are outside the
  804. scope of this specification. However, this section specifies minimum
  805. management functionality that must be provided, to allow a user or
  806. system administrator to control whether and how IPsec is applied to
  807. traffic transmitted or received by a host or transiting a security
  808. gateway. The SPD, or relevant caches, must be consulted during the
  809. processing of all traffic (inbound and outbound), including traffic
  810. not protected by IPsec, that traverses the IPsec boundary. This
  811. includes IPsec management traffic such as IKE. An IPsec
  812. Kent & Seo Standards Track [Page 19]
  813. RFC 4301 Security Architecture for IP December 2005
  814. implementation MUST have at least one SPD, and it MAY support
  815. multiple SPDs, if appropriate for the context in which the IPsec
  816. implementation operates. There is no requirement to maintain SPDs on
  817. a per-interface basis, as was specified in RFC 2401 [RFC2401].
  818. However, if an implementation supports multiple SPDs, then it MUST
  819. include an explicit SPD selection function that is invoked to select
  820. the appropriate SPD for outbound traffic processing. The inputs to
  821. this function are the outbound packet and any local metadata (e.g.,
  822. the interface via which the packet arrived) required to effect the
  823. SPD selection function. The output of the function is an SPD
  824. identifier (SPD-ID).
  825. The SPD is an ordered database, consistent with the use of Access
  826. Control Lists (ACLs) or packet filters in firewalls, routers, etc.
  827. The ordering requirement arises because entries often will overlap
  828. due to the presence of (non-trivial) ranges as values for selectors.
  829. Thus, a user or administrator MUST be able to order the entries to
  830. express a desired access control policy. There is no way to impose a
  831. general, canonical order on SPD entries, because of the allowed use
  832. of wildcards for selector values and because the different types of
  833. selectors are not hierarchically related.
  834. Processing Choices: DISCARD, BYPASS, PROTECT
  835. An SPD must discriminate among traffic that is afforded IPsec
  836. protection and traffic that is allowed to bypass IPsec. This
  837. applies to the IPsec protection to be applied by a sender and to
  838. the IPsec protection that must be present at the receiver. For
  839. any outbound or inbound datagram, three processing choices are
  840. possible: DISCARD, BYPASS IPsec, or PROTECT using IPsec. The
  841. first choice refers to traffic that is not allowed to traverse the
  842. IPsec boundary (in the specified direction). The second choice
  843. refers to traffic that is allowed to cross the IPsec boundary
  844. without IPsec protection. The third choice refers to traffic that
  845. is afforded IPsec protection, and for such traffic the SPD must
  846. specify the security protocols to be employed, their mode,
  847. security service options, and the cryptographic algorithms to be
  848. used.
  849. SPD-S, SPD-I, SPD-O
  850. An SPD is logically divided into three pieces. The SPD-S (secure
  851. traffic) contains entries for all traffic subject to IPsec
  852. protection. SPD-O (outbound) contains entries for all outbound
  853. traffic that is to be bypassed or discarded. SPD-I (inbound) is
  854. applied to inbound traffic that will be bypassed or discarded.
  855. All three of these can be decorrelated (with the exception noted
  856. above for native host implementations) to facilitate caching. If
  857. Kent & Seo Standards Track [Page 20]
  858. RFC 4301 Security Architecture for IP December 2005
  859. an IPsec implementation supports only one SPD, then the SPD
  860. consists of all three parts. If multiple SPDs are supported, some
  861. of them may be partial, e.g., some SPDs might contain only SPD-I
  862. entries, to control inbound bypassed traffic on a per-interface
  863. basis. The split allows SPD-I to be consulted without having to
  864. consult SPD-S, for such traffic. Since the SPD-I is just a part
  865. of the SPD, if a packet that is looked up in the SPD-I cannot be
  866. matched to an entry there, then the packet MUST be discarded.
  867. Note that for outbound traffic, if a match is not found in SPD-S,
  868. then SPD-O must be checked to see if the traffic should be
  869. bypassed. Similarly, if SPD-O is checked first and no match is
  870. found, then SPD-S must be checked. In an ordered,
  871. non-decorrelated SPD, the entries for the SPD-S, SPD-I, and SPD-O
  872. are interleaved. So there is one lookup in the SPD.
  873. SPD Entries
  874. Each SPD entry specifies packet disposition as BYPASS, DISCARD, or
  875. PROTECT. The entry is keyed by a list of one or more selectors.
  876. The SPD contains an ordered list of these entries. The required
  877. selector types are defined in Section 4.4.1.1. These selectors are
  878. used to define the granularity of the SAs that are created in
  879. response to an outbound packet or in response to a proposal from a
  880. peer. The detailed structure of an SPD entry is described in
  881. Section 4.4.1.2. Every SPD SHOULD have a nominal, final entry that
  882. matches anything that is otherwise unmatched, and discards it.
  883. The SPD MUST permit a user or administrator to specify policy
  884. entries as follows:
  885. - SPD-I: For inbound traffic that is to be bypassed or discarded,
  886. the entry consists of the values of the selectors that apply to
  887. the traffic to be bypassed or discarded.
  888. - SPD-O: For outbound traffic that is to be bypassed or
  889. discarded, the entry consists of the values of the selectors
  890. that apply to the traffic to be bypassed or discarded.
  891. - SPD-S: For traffic that is to be protected using IPsec, the
  892. entry consists of the values of the selectors that apply to the
  893. traffic to be protected via AH or ESP, controls on how to
  894. create SAs based on these selectors, and the parameters needed
  895. to effect this protection (e.g., algorithms, modes, etc.). Note
  896. that an SPD-S entry also contains information such as "populate
  897. from packet" (PFP) flag (see paragraphs below on "How To Derive
  898. the Values for an SAD entry") and bits indicating whether the
  899. Kent & Seo Standards Track [Page 21]
  900. RFC 4301 Security Architecture for IP December 2005
  901. SA lookup makes use of the local and remote IP addresses in
  902. addition to the SPI (see AH [Ken05b] or ESP [Ken05a]
  903. specifications).
  904. Representing Directionality in an SPD Entry
  905. For traffic protected by IPsec, the Local and Remote address and
  906. ports in an SPD entry are swapped to represent directionality,
  907. consistent with IKE conventions. In general, the protocols that
  908. IPsec deals with have the property of requiring symmetric SAs with
  909. flipped Local/Remote IP addresses. However, for ICMP, there is
  910. often no such bi-directional authorization requirement.
  911. Nonetheless, for the sake of uniformity and simplicity, SPD
  912. entries for ICMP are specified in the same way as for other
  913. protocols. Note also that for ICMP, Mobility Header, and
  914. non-initial fragments, there are no port fields in these packets.
  915. ICMP has message type and code and Mobility Header has mobility
  916. header type. Thus, SPD entries have provisions for expressing
  917. access controls appropriate for these protocols, in lieu of the
  918. normal port field controls. For bypassed or discarded traffic,
  919. separate inbound and outbound entries are supported, e.g., to
  920. permit unidirectional flows if required.
  921. OPAQUE and ANY
  922. For each selector in an SPD entry, in addition to the literal
  923. values that define a match, there are two special values: ANY and
  924. OPAQUE. ANY is a wildcard that matches any value in the
  925. corresponding field of the packet, or that matches packets where
  926. that field is not present or is obscured. OPAQUE indicates that
  927. the corresponding selector field is not available for examination
  928. because it may not be present in a fragment, it does not exist for
  929. the given Next Layer Protocol, or prior application of IPsec may
  930. have encrypted the value. The ANY value encompasses the OPAQUE
  931. value. Thus, OPAQUE need be used only when it is necessary to
  932. distinguish between the case of any allowed value for a field, vs.
  933. the absence or unavailability (e.g., due to encryption) of the
  934. field.
  935. How to Derive the Values for an SAD Entry
  936. For each selector in an SPD entry, the entry specifies how to
  937. derive the corresponding values for a new SA Database (SAD, see
  938. Section 4.4.2) entry from those in the SPD and the packet. The
  939. goal is to allow an SAD entry and an SPD cache entry to be created
  940. based on specific selector values from the packet, or from the
  941. matching SPD entry. For outbound traffic, there are SPD-S cache
  942. entries and SPD-O cache entries. For inbound traffic not
  943. Kent & Seo Standards Track [Page 22]
  944. RFC 4301 Security Architecture for IP December 2005
  945. protected by IPsec, there are SPD-I cache entries and there is the
  946. SAD, which represents the cache for inbound IPsec-protected
  947. traffic (see Section 4.4.2). If IPsec processing is specified for
  948. an entry, a "populate from packet" (PFP) flag may be asserted for
  949. one or more of the selectors in the SPD entry (Local IP address;
  950. Remote IP address; Next Layer Protocol; and, depending on Next
  951. Layer Protocol, Local port and Remote port, or ICMP type/code, or
  952. Mobility Header type). If asserted for a given selector X, the
  953. flag indicates that the SA to be created should take its value for
  954. X from the value in the packet. Otherwise, the SA should take its
  955. value(s) for X from the value(s) in the SPD entry. Note: In the
  956. non-PFP case, the selector values negotiated by the SA management
  957. protocol (e.g., IKEv2) may be a subset of those in the SPD entry,
  958. depending on the SPD policy of the peer. Also, whether a single
  959. flag is used for, e.g., source port, ICMP type/code, and Mobility
  960. Header (MH) type, or a separate flag is used for each, is a local
  961. matter.
  962. The following example illustrates the use of the PFP flag in the
  963. context of a security gateway or a BITS/BITW implementation.
  964. Consider an SPD entry where the allowed value for Remote address
  965. is a range of IPv4 addresses: 192.0.2.1 to 192.0.2.10. Suppose an
  966. outbound packet arrives with a destination address of 192.0.2.3,
  967. and there is no extant SA to carry this packet. The value used
  968. for the SA created to transmit this packet could be either of the
  969. two values shown below, depending on what the SPD entry for this
  970. selector says is the source of the selector value:
  971. PFP flag value example of new
  972. for the Remote SAD dest. address
  973. addr. selector selector value
  974. --------------- ------------
  975. a. PFP TRUE 192.0.2.3 (one host)
  976. b. PFP FALSE 192.0.2.1 to 192.0.2.10 (range of hosts)
  977. Note that if the SPD entry above had a value of ANY for the Remote
  978. address, then the SAD selector value would have to be ANY for case
  979. (b), but would still be as illustrated for case (a). Thus, the
  980. PFP flag can be used to prohibit sharing of an SA, even among
  981. packets that match the same SPD entry.
  982. Management Interface
  983. For every IPsec implementation, there MUST be a management
  984. interface that allows a user or system administrator to manage the
  985. SPD. The interface must allow the user (or administrator) to
  986. specify the security processing to be applied to every packet that
  987. traverses the IPsec boundary. (In a native host IPsec
  988. Kent & Seo Standards Track [Page 23]
  989. RFC 4301 Security Architecture for IP December 2005
  990. implementation making use of a socket interface, the SPD may not
  991. need to be consulted on a per-packet basis, as noted at the end of
  992. Section 4.4.1.1 and in Section 5.) The management interface for
  993. the SPD MUST allow creation of entries consistent with the
  994. selectors defined in Section 4.4.1.1, and MUST support (total)
  995. ordering of these entries, as seen via this interface. The SPD
  996. entries' selectors are analogous to the ACL or packet filters
  997. commonly found in a stateless firewall or packet filtering router
  998. and which are currently managed this way.
  999. In host systems, applications MAY be allowed to create SPD
  1000. entries. (The means of signaling such requests to the IPsec
  1001. implementation are outside the scope of this standard.) However,
  1002. the system administrator MUST be able to specify whether or not a
  1003. user or application can override (default) system policies. The
  1004. form of the management interface is not specified by this document
  1005. and may differ for hosts vs. security gateways, and within hosts
  1006. the interface may differ for socket-based vs. BITS
  1007. implementations. However, this document does specify a standard
  1008. set of SPD elements that all IPsec implementations MUST support.
  1009. Decorrelation
  1010. The processing model described in this document assumes the
  1011. ability to decorrelate overlapping SPD entries to permit caching,
  1012. which enables more efficient processing of outbound traffic in
  1013. security gateways and BITS/BITW implementations. Decorrelation
  1014. [CoSa04] is only a means of improving performance and simplifying
  1015. the processing description. This RFC does not require a compliant
  1016. implementation to make use of decorrelation. For example, native
  1017. host implementations typically make use of caching implicitly
  1018. because they bind SAs to socket interfaces, and thus there is no
  1019. requirement to be able to decorrelate SPD entries in these
  1020. implementations.
  1021. Note: Unless otherwise qualified, the use of "SPD" refers to the
  1022. body of policy information in both ordered or decorrelated
  1023. (unordered) state. Appendix B provides an algorithm that can be
  1024. used to decorrelate SPD entries, but any algorithm that produces
  1025. equivalent output may be used. Note that when an SPD entry is
  1026. decorrelated all the resulting entries MUST be linked together, so
  1027. that all members of the group derived from an individual, SPD
  1028. entry (prior to decorrelation) can all be placed into caches and
  1029. into the SAD at the same time. For example, suppose one starts
  1030. with an entry A (from an ordered SPD) that when decorrelated,
  1031. yields entries A1, A2, and A3. When a packet comes along that
  1032. matches, say A2, and triggers the creation of an SA, the SA
  1033. management protocol (e.g., IKEv2) negotiates A. And all 3
  1034. Kent & Seo Standards Track [Page 24]
  1035. RFC 4301 Security Architecture for IP December 2005
  1036. decorrelated entries, A1, A2, and A3, are placed in the
  1037. appropriate SPD-S cache and linked to the SA. The intent is that
  1038. use of a decorrelated SPD ought not to create more SAs than would
  1039. have resulted from use of a not-decorrelated SPD.
  1040. If a decorrelated SPD is employed, there are three options for
  1041. what an initiator sends to a peer via an SA management protocol
  1042. (e.g., IKE). By sending the complete set of linked, decorrelated
  1043. entries that were selected from the SPD, a peer is given the best
  1044. possible information to enable selection of the appropriate SPD
  1045. entry at its end, especially if the peer has also decorrelated its
  1046. SPD. However, if a large number of decorrelated entries are
  1047. linked, this may create large packets for SA negotiation, and
  1048. hence fragmentation problems for the SA management protocol.
  1049. Alternatively, the original entry from the (correlated) SPD may be
  1050. retained and passed to the SA management protocol. Passing the
  1051. correlated SPD entry keeps the use of a decorrelated SPD a local
  1052. matter, not visible to peers, and avoids possible fragmentation
  1053. concerns, although it provides less precise information to a
  1054. responder for matching against the responder's SPD.
  1055. An intermediate approach is to send a subset of the complete set
  1056. of linked, decorrelated SPD entries. This approach can avoid the
  1057. fragmentation problems cited above yet provide better information
  1058. than the original, correlated entry. The major shortcoming of
  1059. this approach is that it may cause additional SAs to be created
  1060. later, since only a subset of the linked, decorrelated entries are
  1061. sent to a peer. Implementers are free to employ any of the
  1062. approaches cited above.
  1063. A responder uses the traffic selector proposals it receives via an
  1064. SA management protocol to select an appropriate entry in its SPD.
  1065. The intent of the matching is to select an SPD entry and create an
  1066. SA that most closely matches the intent of the initiator, so that
  1067. traffic traversing the resulting SA will be accepted at both ends.
  1068. If the responder employs a decorrelated SPD, it SHOULD use the
  1069. decorrelated SPD entries for matching, as this will generally
  1070. result in creation of SAs that are more likely to match the intent
  1071. of both peers. If the responder has a correlated SPD, then it
  1072. SHOULD match the proposals against the correlated entries. For
  1073. IKEv2, use of a decorrelated SPD offers the best opportunity for a
  1074. responder to generate a "narrowed" response.
  1075. In all cases, when a decorrelated SPD is available, the
  1076. decorrelated entries are used to populate the SPD-S cache. If the
  1077. SPD is not decorrelated, caching is not allowed and an ordered
  1078. Kent & Seo Standards Track [Page 25]
  1079. RFC 4301 Security Architecture for IP December 2005
  1080. search of SPD MUST be performed to verify that inbound traffic
  1081. arriving on an SA is consistent with the access control policy
  1082. expressed in the SPD.
  1083. Handling Changes to the SPD While the System Is Running
  1084. If a change is made to the SPD while the system is running, a
  1085. check SHOULD be made of the effect of this change on extant SAs.
  1086. An implementation SHOULD check the impact of an SPD change on
  1087. extant SAs and SHOULD provide a user/administrator with a
  1088. mechanism for configuring what actions to take, e.g., delete an
  1089. affected SA, allow an affected SA to continue unchanged, etc.
  1090. 4.4.1.1. Selectors
  1091. An SA may be fine-grained or coarse-grained, depending on the
  1092. selectors used to define the set of traffic for the SA. For example,
  1093. all traffic between two hosts may be carried via a single SA, and
  1094. afforded a uniform set of security services. Alternatively, traffic
  1095. between a pair of hosts might be spread over multiple SAs, depending
  1096. on the applications being used (as defined by the Next Layer Protocol
  1097. and related fields, e.g., ports), with different security services
  1098. offered by different SAs. Similarly, all traffic between a pair of
  1099. security gateways could be carried on a single SA, or one SA could be
  1100. assigned for each communicating host pair. The following selector
  1101. parameters MUST be supported by all IPsec implementations to
  1102. facilitate control of SA granularity. Note that both Local and
  1103. Remote addresses should either be IPv4 or IPv6, but not a mix of
  1104. address types. Also, note that the Local/Remote port selectors (and
  1105. ICMP message type and code, and Mobility Header type) may be labeled
  1106. as OPAQUE to accommodate situations where these fields are
  1107. inaccessible due to packet fragmentation.
  1108. - Remote IP Address(es) (IPv4 or IPv6): This is a list of ranges
  1109. of IP addresses (unicast, broadcast (IPv4 only)). This
  1110. structure allows expression of a single IP address (via a
  1111. trivial range), or a list of addresses (each a trivial range),
  1112. or a range of addresses (low and high values, inclusive), as
  1113. well as the most generic form of a list of ranges. Address
  1114. ranges are used to support more than one remote system sharing
  1115. the same SA, e.g., behind a security gateway.
  1116. - Local IP Address(es) (IPv4 or IPv6): This is a list of ranges of
  1117. IP addresses (unicast, broadcast (IPv4 only)). This structure
  1118. allows expression of a single IP address (via a trivial range),
  1119. or a list of addresses (each a trivial range), or a range of
  1120. addresses (low and high values, inclusive), as well as the most
  1121. generic form of a list of ranges. Address ranges are used to
  1122. Kent & Seo Standards Track [Page 26]
  1123. RFC 4301 Security Architecture for IP December 2005
  1124. support more than one source system sharing the same SA, e.g.,
  1125. behind a security gateway. Local refers to the address(es)
  1126. being protected by this implementation (or policy entry).
  1127. Note: The SPD does not include support for multicast address
  1128. entries. To support multicast SAs, an implementation should
  1129. make use of a Group SPD (GSPD) as defined in [RFC3740]. GSPD
  1130. entries require a different structure, i.e., one cannot use the
  1131. symmetric relationship associated with local and remote address
  1132. values for unicast SAs in a multicast context. Specifically,
  1133. outbound traffic directed to a multicast address on an SA would
  1134. not be received on a companion, inbound SA with the multicast
  1135. address as the source.
  1136. - Next Layer Protocol: Obtained from the IPv4 "Protocol" or the
  1137. IPv6 "Next Header" fields. This is an individual protocol
  1138. number, ANY, or for IPv6 only, OPAQUE. The Next Layer Protocol
  1139. is whatever comes after any IP extension headers that are
  1140. present. To simplify locating the Next Layer Protocol, there
  1141. SHOULD be a mechanism for configuring which IPv6 extension
  1142. headers to skip. The default configuration for which protocols
  1143. to skip SHOULD include the following protocols: 0 (Hop-by-hop
  1144. options), 43 (Routing Header), 44 (Fragmentation Header), and 60
  1145. (Destination Options). Note: The default list does NOT include
  1146. 51 (AH) or 50 (ESP). From a selector lookup point of view,
  1147. IPsec treats AH and ESP as Next Layer Protocols.
  1148. Several additional selectors depend on the Next Layer Protocol
  1149. value:
  1150. * If the Next Layer Protocol uses two ports (as do TCP, UDP,
  1151. SCTP, and others), then there are selectors for Local and
  1152. Remote Ports. Each of these selectors has a list of ranges
  1153. of values. Note that the Local and Remote ports may not be
  1154. available in the case of receipt of a fragmented packet or if
  1155. the port fields have been protected by IPsec (encrypted);
  1156. thus, a value of OPAQUE also MUST be supported. Note: In a
  1157. non-initial fragment, port values will not be available. If
  1158. a port selector specifies a value other than ANY or OPAQUE,
  1159. it cannot match packets that are non-initial fragments. If
  1160. the SA requires a port value other than ANY or OPAQUE, an
  1161. arriving fragment without ports MUST be discarded. (See
  1162. Section 7, "Handling Fragments".)
  1163. * If the Next Layer Protocol is a Mobility Header, then there
  1164. is a selector for IPv6 Mobility Header message type (MH type)
  1165. [Mobip]. This is an 8-bit value that identifies a particular
  1166. mobility message. Note that the MH type may not be available
  1167. Kent & Seo Standards Track [Page 27]
  1168. RFC 4301 Security Architecture for IP December 2005
  1169. in the case of receipt of a fragmented packet. (See Section
  1170. 7, "Handling Fragments".) For IKE, the IPv6 Mobility Header
  1171. message type (MH type) is placed in the most significant
  1172. eight bits of the 16-bit local "port" selector.
  1173. * If the Next Layer Protocol value is ICMP, then there is a
  1174. 16-bit selector for the ICMP message type and code. The
  1175. message type is a single 8-bit value, which defines the type
  1176. of an ICMP message, or ANY. The ICMP code is a single 8-bit
  1177. value that defines a specific subtype for an ICMP message.
  1178. For IKE, the message type is placed in the most significant 8
  1179. bits of the 16-bit selector and the code is placed in the
  1180. least significant 8 bits. This 16-bit selector can contain a
  1181. single type and a range of codes, a single type and ANY code,
  1182. and ANY type and ANY code. Given a policy entry with a range
  1183. of Types (T-start to T-end) and a range of Codes (C-start to
  1184. C-end), and an ICMP packet with Type t and Code c, an
  1185. implementation MUST test for a match using
  1186. (T-start*256) + C-start <= (t*256) + c <= (T-end*256) +
  1187. C-end
  1188. Note that the ICMP message type and code may not be available
  1189. in the case of receipt of a fragmented packet. (See Section
  1190. 7, "Handling Fragments".)
  1191. - Name: This is not a selector like the others above. It is not
  1192. acquired from a packet. A name may be used as a symbolic
  1193. identifier for an IPsec Local or Remote address. Named SPD
  1194. entries are used in two ways:
  1195. 1. A named SPD entry is used by a responder (not an initiator)
  1196. in support of access control when an IP address would not be
  1197. appropriate for the Remote IP address selector, e.g., for
  1198. "road warriors". The name used to match this field is
  1199. communicated during the IKE negotiation in the ID payload.
  1200. In this context, the initiator's Source IP address (inner IP
  1201. header in tunnel mode) is bound to the Remote IP address in
  1202. the SAD entry created by the IKE negotiation. This address
  1203. overrides the Remote IP address value in the SPD, when the
  1204. SPD entry is selected in this fashion. All IPsec
  1205. implementations MUST support this use of names.
  1206. 2. A named SPD entry may be used by an initiator to identify a
  1207. user for whom an IPsec SA will be created (or for whom
  1208. traffic may be bypassed). The initiator's IP source address
  1209. (from inner IP header in tunnel mode) is used to replace the
  1210. following if and when they are created:
  1211. Kent & Seo Standards Track [Page 28]
  1212. RFC 4301 Security Architecture for IP December 2005
  1213. - local address in the SPD cache entry
  1214. - local address in the outbound SAD entry
  1215. - remote address in the inbound SAD entry
  1216. Support for this use is optional for multi-user, native host
  1217. implementations and not applicable to other implementations.
  1218. Note that this name is used only locally; it is not
  1219. communicated by the key management protocol. Also, name
  1220. forms other than those used for case 1 above (responder) are
  1221. applicable in the initiator context (see below).
  1222. An SPD entry can contain both a name (or a list of names) and
  1223. also values for the Local or Remote IP address.
  1224. For case 1, responder, the identifiers employed in named SPD
  1225. entries are one of the following four types:
  1226. a. a fully qualified user name string (email), e.g.,
  1227. mozart@foo.example.com
  1228. (this corresponds to ID_RFC822_ADDR in IKEv2)
  1229. b. a fully qualified DNS name, e.g.,
  1230. foo.example.com
  1231. (this corresponds to ID_FQDN in IKEv2)
  1232. c. X.500 distinguished name, e.g., [WaKiHo97],
  1233. CN = Stephen T. Kent, O = BBN Technologies,
  1234. SP = MA, C = US
  1235. (this corresponds to ID_DER_ASN1_DN in IKEv2, after
  1236. decoding)
  1237. d. a byte string
  1238. (this corresponds to Key_ID in IKEv2)
  1239. For case 2, initiator, the identifiers employed in named SPD
  1240. entries are of type byte string. They are likely to be Unix
  1241. UIDs, Windows security IDs, or something similar, but could
  1242. also be a user name or account name. In all cases, this
  1243. identifier is only of local concern and is not transmitted.
  1244. The IPsec implementation context determines how selectors are used.
  1245. For example, a native host implementation typically makes use of a
  1246. socket interface. When a new connection is established, the SPD can
  1247. be consulted and an SA bound to the socket. Thus, traffic sent via
  1248. that socket need not result in additional lookups to the SPD (SPD-O
  1249. and SPD-S) cache. In contrast, a BITS, BITW, or security gateway
  1250. implementation needs to look at each packet and perform an
  1251. SPD-O/SPD-S cache lookup based on the selectors.
  1252. Kent & Seo Standards Track [Page 29]
  1253. RFC 4301 Security Architecture for IP December 2005
  1254. 4.4.1.2. Structure of an SPD Entry
  1255. This section contains a prose description of an SPD entry. Also,
  1256. Appendix C provides an example of an ASN.1 definition of an SPD
  1257. entry.
  1258. This text describes the SPD in a fashion that is intended to map
  1259. directly into IKE payloads to ensure that the policy required by SPD
  1260. entries can be negotiated through IKE. Unfortunately, the semantics
  1261. of the version of IKEv2 published concurrently with this document
  1262. [Kau05] do not align precisely with those defined for the SPD.
  1263. Specifically, IKEv2 does not enable negotiation of a single SA that
  1264. binds multiple pairs of local and remote addresses and ports to a
  1265. single SA. Instead, when multiple local and remote addresses and
  1266. ports are negotiated for an SA, IKEv2 treats these not as pairs, but
  1267. as (unordered) sets of local and remote values that can be
  1268. arbitrarily paired. Until IKE provides a facility that conveys the
  1269. semantics that are expressed in the SPD via selector sets (as
  1270. described below), users MUST NOT include multiple selector sets in a
  1271. single SPD entry unless the access control intent aligns with the IKE
  1272. "mix and match" semantics. An implementation MAY warn users, to
  1273. alert them to this problem if users create SPD entries with multiple
  1274. selector sets, the syntax of which indicates possible conflicts with
  1275. current IKE semantics.
  1276. The management GUI can offer the user other forms of data entry and
  1277. display, e.g., the option of using address prefixes as well as
  1278. ranges, and symbolic names for protocols, ports, etc. (Do not confuse
  1279. the use of symbolic names in a management interface with the SPD
  1280. selector "Name".) Note that Remote/Local apply only to IP addresses
  1281. and ports, not to ICMP message type/code or Mobility Header type.
  1282. Also, if the reserved, symbolic selector value OPAQUE or ANY is
  1283. employed for a given selector type, only that value may appear in the
  1284. list for that selector, and it must appear only once in the list for
  1285. that selector. Note that ANY and OPAQUE are local syntax conventions
  1286. -- IKEv2 negotiates these values via the ranges indicated below:
  1287. ANY: start = 0 end = <max>
  1288. OPAQUE: start = <max> end = 0
  1289. An SPD is an ordered list of entries each of which contains the
  1290. following fields.
  1291. o Name -- a list of IDs. This quasi-selector is optional.
  1292. The forms that MUST be supported are described above in
  1293. Section 4.4.1.1 under "Name".
  1294. Kent & Seo Standards Track [Page 30]
  1295. RFC 4301 Security Architecture for IP December 2005
  1296. o PFP flags -- one per traffic selector. A given flag, e.g.,
  1297. for Next Layer Protocol, applies to the relevant selector
  1298. across all "selector sets" (see below) contained in an SPD
  1299. entry. When creating an SA, each flag specifies for the
  1300. corresponding traffic selector whether to instantiate the
  1301. selector from the corresponding field in the packet that
  1302. triggered the creation of the SA or from the value(s) in
  1303. the corresponding SPD entry (see Section 4.4.1, "How to
  1304. Derive the Values for an SAD Entry"). Whether a single
  1305. flag is used for, e.g., source port, ICMP type/code, and
  1306. MH type, or a separate flag is used for each, is a local
  1307. matter. There are PFP flags for:
  1308. - Local Address
  1309. - Remote Address
  1310. - Next Layer Protocol
  1311. - Local Port, or ICMP message type/code or Mobility
  1312. Header type (depending on the next layer protocol)
  1313. - Remote Port, or ICMP message type/code or Mobility
  1314. Header type (depending on the next layer protocol)
  1315. o One to N selector sets that correspond to the "condition"
  1316. for applying a particular IPsec action. Each selector set
  1317. contains:
  1318. - Local Address
  1319. - Remote Address
  1320. - Next Layer Protocol
  1321. - Local Port, or ICMP message type/code or Mobility
  1322. Header type (depending on the next layer protocol)
  1323. - Remote Port, or ICMP message type/code or Mobility
  1324. Header type (depending on the next layer protocol)
  1325. Note: The "next protocol" selector is an individual value
  1326. (unlike the local and remote IP addresses) in a selector
  1327. set entry. This is consistent with how IKEv2 negotiates
  1328. the Traffic Selector (TS) values for an SA. It also makes
  1329. sense because one may need to associate different port
  1330. fields with different protocols. It is possible to
  1331. associate multiple protocols (and ports) with a single SA
  1332. by specifying multiple selector sets for that SA.
  1333. o Processing info -- which action is required -- PROTECT,
  1334. BYPASS, or DISCARD. There is just one action that goes
  1335. with all the selector sets, not a separate action for each
  1336. set. If the required processing is PROTECT, the entry
  1337. contains the following information.
  1338. - IPsec mode -- tunnel or transport
  1339. Kent & Seo Standards Track [Page 31]
  1340. RFC 4301 Security Architecture for IP December 2005
  1341. - (if tunnel mode) local tunnel address -- For a
  1342. non-mobile host, if there is just one interface, this
  1343. is straightforward; if there are multiple
  1344. interfaces, this must be statically configured. For a
  1345. mobile host, the specification of the local address
  1346. is handled externally to IPsec.
  1347. - (if tunnel mode) remote tunnel address -- There is no
  1348. standard way to determine this. See 4.5.3, "Locating
  1349. a Security Gateway".
  1350. - Extended Sequence Number -- Is this SA using extended
  1351. sequence numbers?
  1352. - stateful fragment checking -- Is this SA using
  1353. stateful fragment checking? (See Section 7 for more
  1354. details.)
  1355. - Bypass DF bit (T/F) -- applicable to tunnel mode SAs
  1356. - Bypass DSCP (T/F) or map to unprotected DSCP values
  1357. (array) if needed to restrict bypass of DSCP values --
  1358. applicable to tunnel mode SAs
  1359. - IPsec protocol -- AH or ESP
  1360. - algorithms -- which ones to use for AH, which ones to
  1361. use for ESP, which ones to use for combined mode,
  1362. ordered by decreasing priority
  1363. It is a local matter as to what information is kept with regard to
  1364. handling extant SAs when the SPD is changed.
  1365. 4.4.1.3. More Regarding Fields Associated with Next Layer Protocols
  1366. Additional selectors are often associated with fields in the Next
  1367. Layer Protocol header. A particular Next Layer Protocol can have
  1368. zero, one, or two selectors. There may be situations where there
  1369. aren't both local and remote selectors for the fields that are
  1370. dependent on the Next Layer Protocol. The IPv6 Mobility Header has
  1371. only a Mobility Header message type. AH and ESP have no further
  1372. selector fields. A system may be willing to send an ICMP message
  1373. type and code that it does not want to receive. In the descriptions
  1374. below, "port" is used to mean a field that is dependent on the Next
  1375. Layer Protocol.
  1376. A. If a Next Layer Protocol has no "port" selectors, then
  1377. the Local and Remote "port" selectors are set to OPAQUE in
  1378. the relevant SPD entry, e.g.,
  1379. Local's
  1380. next layer protocol = AH
  1381. "port" selector = OPAQUE
  1382. Kent & Seo Standards Track [Page 32]
  1383. RFC 4301 Security Architecture for IP December 2005
  1384. Remote's
  1385. next layer protocol = AH
  1386. "port" selector = OPAQUE
  1387. B. Even if a Next Layer Protocol has only one selector, e.g.,
  1388. Mobility Header type, then the Local and Remote "port"
  1389. selectors are used to indicate whether a system is
  1390. willing to send and/or receive traffic with the specified
  1391. "port" values. For example, if Mobility Headers of a
  1392. specified type are allowed to be sent and received via an
  1393. SA, then the relevant SPD entry would be set as follows:
  1394. Local's
  1395. next layer protocol = Mobility Header
  1396. "port" selector = Mobility Header message type
  1397. Remote's
  1398. next layer protocol = Mobility Header
  1399. "port" selector = Mobility Header message type
  1400. If Mobility Headers of a specified type are allowed to be
  1401. sent but NOT received via an SA, then the relevant SPD
  1402. entry would be set as follows:
  1403. Local's
  1404. next layer protocol = Mobility Header
  1405. "port" selector = Mobility Header message type
  1406. Remote's
  1407. next layer protocol = Mobility Header
  1408. "port" selector = OPAQUE
  1409. If Mobility Headers of a specified type are allowed to be
  1410. received but NOT sent via an SA, then the relevant SPD
  1411. entry would be set as follows:
  1412. Local's
  1413. next layer protocol = Mobility Header
  1414. "port" selector = OPAQUE
  1415. Remote's
  1416. next layer protocol = Mobility Header
  1417. "port" selector = Mobility Header message type
  1418. C. If a system is willing to send traffic with a particular
  1419. "port" value but NOT receive traffic with that kind of
  1420. port value, the system's traffic selectors are set as
  1421. follows in the relevant SPD entry:
  1422. Kent & Seo Standards Track [Page 33]
  1423. RFC 4301 Security Architecture for IP December 2005
  1424. Local's
  1425. next layer protocol = ICMP
  1426. "port" selector = <specific ICMP type & code>
  1427. Remote's
  1428. next layer protocol = ICMP
  1429. "port" selector = OPAQUE
  1430. D. To indicate that a system is willing to receive traffic
  1431. with a particular "port" value but NOT send that kind of
  1432. traffic, the system's traffic selectors are set as follows
  1433. in the relevant SPD entry:
  1434. Local's
  1435. next layer protocol = ICMP
  1436. "port" selector = OPAQUE
  1437. Remote's
  1438. next layer protocol = ICMP
  1439. "port" selector = <specific ICMP type & code>
  1440. For example, if a security gateway is willing to allow
  1441. systems behind it to send ICMP traceroutes, but is not
  1442. willing to let outside systems run ICMP traceroutes to
  1443. systems behind it, then the security gateway's traffic
  1444. selectors are set as follows in the relevant SPD entry:
  1445. Local's
  1446. next layer protocol = 1 (ICMPv4)
  1447. "port" selector = 30 (traceroute)
  1448. Remote's
  1449. next layer protocol = 1 (ICMPv4)
  1450. "port" selector = OPAQUE
  1451. 4.4.2. Security Association Database (SAD)
  1452. In each IPsec implementation, there is a nominal Security Association
  1453. Database (SAD), in which each entry defines the parameters associated
  1454. with one SA. Each SA has an entry in the SAD. For outbound
  1455. processing, each SAD entry is pointed to by entries in the SPD-S part
  1456. of the SPD cache. For inbound processing, for unicast SAs, the SPI
  1457. is used either alone to look up an SA or in conjunction with the
  1458. IPsec protocol type. If an IPsec implementation supports multicast,
  1459. the SPI plus destination address, or SPI plus destination and source
  1460. addresses are used to look up the SA. (See Section 4.1 for details on
  1461. the algorithm that MUST be used for mapping inbound IPsec datagrams
  1462. to SAs.) The following parameters are associated with each entry in
  1463. Kent & Seo Standards Track [Page 34]
  1464. RFC 4301 Security Architecture for IP December 2005
  1465. the SAD. They should all be present except where otherwise noted,
  1466. e.g., AH Authentication algorithm. This description does not purport
  1467. to be a MIB, only a specification of the minimal data items required
  1468. to support an SA in an IPsec implementation.
  1469. For each of the selectors defined in Section 4.4.1.1, the entry for
  1470. an inbound SA in the SAD MUST be initially populated with the value
  1471. or values negotiated at the time the SA was created. (See the
  1472. paragraph in Section 4.4.1 under "Handling Changes to the SPD while
  1473. the System is Running" for guidance on the effect of SPD changes on
  1474. extant SAs.) For a receiver, these values are used to check that the
  1475. header fields of an inbound packet (after IPsec processing) match the
  1476. selector values negotiated for the SA. Thus, the SAD acts as a cache
  1477. for checking the selectors of inbound traffic arriving on SAs. For
  1478. the receiver, this is part of verifying that a packet arriving on an
  1479. SA is consistent with the policy for the SA. (See Section 6 for rules
  1480. for ICMP messages.) These fields can have the form of specific
  1481. values, ranges, ANY, or OPAQUE, as described in Section 4.4.1.1,
  1482. "Selectors". Note also that there are a couple of situations in
  1483. which the SAD can have entries for SAs that do not have corresponding
  1484. entries in the SPD. Since this document does not mandate that the
  1485. SAD be selectively cleared when the SPD is changed, SAD entries can
  1486. remain when the SPD entries that created them are changed or deleted.
  1487. Also, if a manually keyed SA is created, there could be an SAD entry
  1488. for this SA that does not correspond to any SPD entry.
  1489. Note: The SAD can support multicast SAs, if manually configured. An
  1490. outbound multicast SA has the same structure as a unicast SA. The
  1491. source address is that of the sender, and the destination address is
  1492. the multicast group address. An inbound, multicast SA must be
  1493. configured with the source addresses of each peer authorized to
  1494. transmit to the multicast SA in question. The SPI value for a
  1495. multicast SA is provided by a multicast group controller, not by the
  1496. receiver, as for a unicast SA. Because an SAD entry may be required
  1497. to accommodate multiple, individual IP source addresses that were
  1498. part of an SPD entry (for unicast SAs), the required facility for
  1499. inbound, multicast SAs is a feature already present in an IPsec
  1500. implementation. However, because the SPD has no provisions for
  1501. accommodating multicast entries, this document does not specify an
  1502. automated way to create an SAD entry for a multicast, inbound SA.
  1503. Only manually configured SAD entries can be created to accommodate
  1504. inbound, multicast traffic.
  1505. Implementation Guidance: This document does not specify how an SPD-S
  1506. entry refers to the corresponding SAD entry, as this is an
  1507. implementation-specific detail. However, some implementations (based
  1508. on experience from RFC 2401) are known to have problems in this
  1509. regard. In particular, simply storing the (remote tunnel header IP
  1510. Kent & Seo Standards Track [Page 35]
  1511. RFC 4301 Security Architecture for IP December 2005
  1512. address, remote SPI) pair in the SPD cache is not sufficient, since
  1513. the pair does not always uniquely identify a single SAD entry. For
  1514. instance, two hosts behind the same NAT could choose the same SPI
  1515. value. The situation also may arise if a host is assigned an IP
  1516. address (e.g., via DHCP) previously used by some other host, and the
  1517. SAs associated with the old host have not yet been deleted via dead
  1518. peer detection mechanisms. This may lead to packets being sent over
  1519. the wrong SA or, if key management ensures the pair is unique,
  1520. denying the creation of otherwise valid SAs. Thus, implementors
  1521. should implement links between the SPD cache and the SAD in a way
  1522. that does not engender such problems.
  1523. 4.4.2.1. Data Items in the SAD
  1524. The following data items MUST be in the SAD:
  1525. o Security Parameter Index (SPI): a 32-bit value selected by the
  1526. receiving end of an SA to uniquely identify the SA. In an SAD
  1527. entry for an outbound SA, the SPI is used to construct the
  1528. packet's AH or ESP header. In an SAD entry for an inbound SA, the
  1529. SPI is used to map traffic to the appropriate SA (see text on
  1530. unicast/multicast in Section 4.1).
  1531. o Sequence Number Counter: a 64-bit counter used to generate the
  1532. Sequence Number field in AH or ESP headers. 64-bit sequence
  1533. numbers are the default, but 32-bit sequence numbers are also
  1534. supported if negotiated.
  1535. o Sequence Counter Overflow: a flag indicating whether overflow of
  1536. the sequence number counter should generate an auditable event and
  1537. prevent transmission of additional packets on the SA, or whether
  1538. rollover is permitted. The audit log entry for this event SHOULD
  1539. include the SPI value, current date/time, Local Address, Remote
  1540. Address, and the selectors from the relevant SAD entry.
  1541. o Anti-Replay Window: a 64-bit counter and a bit-map (or equivalent)
  1542. used to determine whether an inbound AH or ESP packet is a replay.
  1543. Note: If anti-replay has been disabled by the receiver for an SA,
  1544. e.g., in the case of a manually keyed SA, then the Anti-Replay
  1545. Window is ignored for the SA in question. 64-bit sequence numbers
  1546. are the default, but this counter size accommodates 32-bit
  1547. sequence numbers as well.
  1548. o AH Authentication algorithm, key, etc. This is required only if
  1549. AH is supported.
  1550. Kent & Seo Standards Track [Page 36]
  1551. RFC 4301 Security Architecture for IP December 2005
  1552. o ESP Encryption algorithm, key, mode, IV, etc. If a combined mode
  1553. algorithm is used, these fields will not be applicable.
  1554. o ESP integrity algorithm, keys, etc. If the integrity service is
  1555. not selected, these fields will not be applicable. If a combined
  1556. mode algorithm is used, these fields will not be applicable.
  1557. o ESP combined mode algorithms, key(s), etc. This data is used when
  1558. a combined mode (encryption and integrity) algorithm is used with
  1559. ESP. If a combined mode algorithm is not used, these fields are
  1560. not applicable.
  1561. o Lifetime of this SA: a time interval after which an SA must be
  1562. replaced with a new SA (and new SPI) or terminated, plus an
  1563. indication of which of these actions should occur. This may be
  1564. expressed as a time or byte count, or a simultaneous use of both
  1565. with the first lifetime to expire taking precedence. A compliant
  1566. implementation MUST support both types of lifetimes, and MUST
  1567. support a simultaneous use of both. If time is employed, and if
  1568. IKE employs X.509 certificates for SA establishment, the SA
  1569. lifetime must be constrained by the validity intervals of the
  1570. certificates, and the NextIssueDate of the Certificate Revocation
  1571. Lists (CRLs) used in the IKE exchange for the SA. Both initiator
  1572. and responder are responsible for constraining the SA lifetime in
  1573. this fashion. Note: The details of how to handle the refreshing
  1574. of keys when SAs expire is a local matter. However, one
  1575. reasonable approach is:
  1576. (a) If byte count is used, then the implementation SHOULD count the
  1577. number of bytes to which the IPsec cryptographic algorithm is
  1578. applied. For ESP, this is the encryption algorithm (including
  1579. Null encryption) and for AH, this is the authentication
  1580. algorithm. This includes pad bytes, etc. Note that
  1581. implementations MUST be able to handle having the counters at
  1582. the ends of an SA get out of synch, e.g., because of packet
  1583. loss or because the implementations at each end of the SA
  1584. aren't doing things the same way.
  1585. (b) There SHOULD be two kinds of lifetime -- a soft lifetime that
  1586. warns the implementation to initiate action such as setting up
  1587. a replacement SA, and a hard lifetime when the current SA ends
  1588. and is destroyed.
  1589. (c) If the entire packet does not get delivered during the SA's
  1590. lifetime, the packet SHOULD be discarded.
  1591. o IPsec protocol mode: tunnel or transport. Indicates which mode of
  1592. AH or ESP is applied to traffic on this SA.
  1593. Kent & Seo Standards Track [Page 37]
  1594. RFC 4301 Security Architecture for IP December 2005
  1595. o Stateful fragment checking flag. Indicates whether or not
  1596. stateful fragment checking applies to this SA.
  1597. o Bypass DF bit (T/F) -- applicable to tunnel mode SAs where both
  1598. inner and outer headers are IPv4.
  1599. o DSCP values -- the set of DSCP values allowed for packets carried
  1600. over this SA. If no values are specified, no DSCP-specific
  1601. filtering is applied. If one or more values are specified, these
  1602. are used to select one SA among several that match the traffic
  1603. selectors for an outbound packet. Note that these values are NOT
  1604. checked against inbound traffic arriving on the SA.
  1605. o Bypass DSCP (T/F) or map to unprotected DSCP values (array) if
  1606. needed to restrict bypass of DSCP values -- applicable to tunnel
  1607. mode SAs. This feature maps DSCP values from an inner header to
  1608. values in an outer header, e.g., to address covert channel
  1609. signaling concerns.
  1610. o Path MTU: any observed path MTU and aging variables.
  1611. o Tunnel header IP source and destination address -- both addresses
  1612. must be either IPv4 or IPv6 addresses. The version implies the
  1613. type of IP header to be used. Only used when the IPsec protocol
  1614. mode is tunnel.
  1615. 4.4.2.2. Relationship between SPD, PFP flag, packet, and SAD
  1616. For each selector, the following tables show the relationship
  1617. between the value in the SPD, the PFP flag, the value in the
  1618. triggering packet, and the resulting value in the SAD. Note that
  1619. the administrative interface for IPsec can use various syntactic
  1620. options to make it easier for the administrator to enter rules.
  1621. For example, although a list of ranges is what IKEv2 sends, it
  1622. might be clearer and less error prone for the user to enter a
  1623. single IP address or IP address prefix.
  1624. Kent & Seo Standards Track [Page 38]
  1625. RFC 4301 Security Architecture for IP December 2005
  1626. Value in
  1627. Triggering Resulting SAD
  1628. Selector SPD Entry PFP Packet Entry
  1629. -------- ---------------- --- ------------ --------------
  1630. loc addr list of ranges 0 IP addr "S" list of ranges
  1631. ANY 0 IP addr "S" ANY
  1632. list of ranges 1 IP addr "S" "S"
  1633. ANY 1 IP addr "S" "S"
  1634. rem addr list of ranges 0 IP addr "D" list of ranges
  1635. ANY 0 IP addr "D" ANY
  1636. list of ranges 1 IP addr "D" "D"
  1637. ANY 1 IP addr "D" "D"
  1638. protocol list of prot's* 0 prot. "P" list of prot's*
  1639. ANY** 0 prot. "P" ANY
  1640. OPAQUE**** 0 prot. "P" OPAQUE
  1641. list of prot's* 0 not avail. discard packet
  1642. ANY** 0 not avail. ANY
  1643. OPAQUE**** 0 not avail. OPAQUE
  1644. list of prot's* 1 prot. "P" "P"
  1645. ANY** 1 prot. "P" "P"
  1646. OPAQUE**** 1 prot. "P" ***
  1647. list of prot's* 1 not avail. discard packet
  1648. ANY** 1 not avail. discard packet
  1649. OPAQUE**** 1 not avail. ***
  1650. Kent & Seo Standards Track [Page 39]
  1651. RFC 4301 Security Architecture for IP December 2005
  1652. If the protocol is one that has two ports, then there will be
  1653. selectors for both Local and Remote ports.
  1654. Value in
  1655. Triggering Resulting SAD
  1656. Selector SPD Entry PFP Packet Entry
  1657. -------- ---------------- --- ------------ --------------
  1658. loc port list of ranges 0 src port "s" list of ranges
  1659. ANY 0 src port "s" ANY
  1660. OPAQUE 0 src port "s" OPAQUE
  1661. list of ranges 0 not avail. discard packet
  1662. ANY 0 not avail. ANY
  1663. OPAQUE 0 not avail. OPAQUE
  1664. list of ranges 1 src port "s" "s"
  1665. ANY 1 src port "s" "s"
  1666. OPAQUE 1 src port "s" ***
  1667. list of ranges 1 not avail. discard packet
  1668. ANY 1 not avail. discard packet
  1669. OPAQUE 1 not avail. ***
  1670. rem port list of ranges 0 dst port "d" list of ranges
  1671. ANY 0 dst port "d" ANY
  1672. OPAQUE 0 dst port "d" OPAQUE
  1673. list of ranges 0 not avail. discard packet
  1674. ANY 0 not avail. ANY
  1675. OPAQUE 0 not avail. OPAQUE
  1676. list of ranges 1 dst port "d" "d"
  1677. ANY 1 dst port "d" "d"
  1678. OPAQUE 1 dst port "d" ***
  1679. list of ranges 1 not avail. discard packet
  1680. ANY 1 not avail. discard packet
  1681. OPAQUE 1 not avail. ***
  1682. Kent & Seo Standards Track [Page 40]
  1683. RFC 4301 Security Architecture for IP December 2005
  1684. If the protocol is mobility header, then there will be a selector
  1685. for mh type.
  1686. Value in
  1687. Triggering Resulting SAD
  1688. Selector SPD Entry PFP Packet Entry
  1689. -------- ---------------- --- ------------ --------------
  1690. mh type list of ranges 0 mh type "T" list of ranges
  1691. ANY 0 mh type "T" ANY
  1692. OPAQUE 0 mh type "T" OPAQUE
  1693. list of ranges 0 not avail. discard packet
  1694. ANY 0 not avail. ANY
  1695. OPAQUE 0 not avail. OPAQUE
  1696. list of ranges 1 mh type "T" "T"
  1697. ANY 1 mh type "T" "T"
  1698. OPAQUE 1 mh type "T" ***
  1699. list of ranges 1 not avail. discard packet
  1700. ANY 1 not avail. discard packet
  1701. OPAQUE 1 not avail. ***
  1702. Kent & Seo Standards Track [Page 41]
  1703. RFC 4301 Security Architecture for IP December 2005
  1704. If the protocol is ICMP, then there will be a 16-bit selector for
  1705. ICMP type and ICMP code. Note that the type and code are bound to
  1706. each other, i.e., the codes apply to the particular type. This
  1707. 16-bit selector can contain a single type and a range of codes, a
  1708. single type and ANY code, and ANY type and ANY code.
  1709. Value in
  1710. Triggering Resulting SAD
  1711. Selector SPD Entry PFP Packet Entry
  1712. --------- ---------------- --- ------------ --------------
  1713. ICMP type a single type & 0 type "t" & single type &
  1714. and code range of codes code "c" range of codes
  1715. a single type & 0 type "t" & single type &
  1716. ANY code code "c" ANY code
  1717. ANY type & ANY 0 type "t" & ANY type &
  1718. code code "c" ANY code
  1719. OPAQUE 0 type "t" & OPAQUE
  1720. code "c"
  1721. a single type & 0 not avail. discard packet
  1722. range of codes
  1723. a single type & 0 not avail. discard packet
  1724. ANY code
  1725. ANY type & 0 not avail. ANY type &
  1726. ANY code ANY code
  1727. OPAQUE 0 not avail. OPAQUE
  1728. a single type & 1 type "t" & "t" and "c"
  1729. range of codes code "c"
  1730. a single type & 1 type "t" & "t" and "c"
  1731. ANY code code "c"
  1732. ANY type & 1 type "t" & "t" and "c"
  1733. ANY code code "c"
  1734. OPAQUE 1 type "t" & ***
  1735. code "c"
  1736. a single type & 1 not avail. discard packet
  1737. range of codes
  1738. a single type & 1 not avail. discard packet
  1739. ANY code
  1740. ANY type & 1 not avail. discard packet
  1741. ANY code
  1742. OPAQUE 1 not avail. ***
  1743. Kent & Seo Standards Track [Page 42]
  1744. RFC 4301 Security Architecture for IP December 2005
  1745. If the name selector is used:
  1746. Value in
  1747. Triggering Resulting SAD
  1748. Selector SPD Entry PFP Packet Entry
  1749. --------- ---------------- --- ------------ --------------
  1750. name list of user or N/A N/A N/A
  1751. system names
  1752. * "List of protocols" is the information, not the way
  1753. that the SPD or SAD or IKEv2 have to represent this
  1754. information.
  1755. ** 0 (zero) is used by IKE to indicate ANY for
  1756. protocol.
  1757. *** Use of PFP=1 with an OPAQUE value is an error and
  1758. SHOULD be prohibited by an IPsec implementation.
  1759. **** The protocol field cannot be OPAQUE in IPv4. This
  1760. table entry applies only to IPv6.
  1761. 4.4.3. Peer Authorization Database (PAD)
  1762. The Peer Authorization Database (PAD) provides the link between the
  1763. SPD and a security association management protocol such as IKE. It
  1764. embodies several critical functions:
  1765. o identifies the peers or groups of peers that are authorized
  1766. to communicate with this IPsec entity
  1767. o specifies the protocol and method used to authenticate each
  1768. peer
  1769. o provides the authentication data for each peer
  1770. o constrains the types and values of IDs that can be asserted
  1771. by a peer with regard to child SA creation, to ensure that the
  1772. peer does not assert identities for lookup in the SPD that it
  1773. is not authorized to represent, when child SAs are created
  1774. o peer gateway location info, e.g., IP address(es) or DNS names,
  1775. MAY be included for peers that are known to be "behind" a
  1776. security gateway
  1777. The PAD provides these functions for an IKE peer when the peer acts
  1778. as either the initiator or the responder.
  1779. To perform these functions, the PAD contains an entry for each peer
  1780. or group of peers with which the IPsec entity will communicate. An
  1781. entry names an individual peer (a user, end system or security
  1782. gateway) or specifies a group of peers (using ID matching rules
  1783. defined below). The entry specifies the authentication protocol
  1784. (e.g., IKEv1, IKEv2, KINK) method used (e.g., certificates or pre-
  1785. shared secrets) and the authentication data (e.g., the pre-shared
  1786. Kent & Seo Standards Track [Page 43]
  1787. RFC 4301 Security Architecture for IP December 2005
  1788. secret or the trust anchor relative to which the peer's certificate
  1789. will be validated). For certificate-based authentication, the entry
  1790. also may provide information to assist in verifying the revocation
  1791. status of the peer, e.g., a pointer to a CRL repository or the name
  1792. of an Online Certificate Status Protocol (OCSP) server associated
  1793. with the peer or with the trust anchor associated with the peer.
  1794. Each entry also specifies whether the IKE ID payload will be used as
  1795. a symbolic name for SPD lookup, or whether the remote IP address
  1796. provided in traffic selector payloads will be used for SPD lookups
  1797. when child SAs are created.
  1798. Note that the PAD information MAY be used to support creation of more
  1799. than one tunnel mode SA at a time between two peers, e.g., two
  1800. tunnels to protect the same addresses/hosts, but with different
  1801. tunnel endpoints.
  1802. 4.4.3.1. PAD Entry IDs and Matching Rules
  1803. The PAD is an ordered database, where the order is defined by an
  1804. administrator (or a user in the case of a single-user end system).
  1805. Usually, the same administrator will be responsible for both the PAD
  1806. and SPD, since the two databases must be coordinated. The ordering
  1807. requirement for the PAD arises for the same reason as for the SPD,
  1808. i.e., because use of "star name" entries allows for overlaps in the
  1809. set of IKE IDs that could match a specific entry.
  1810. Six types of IDs are supported for entries in the PAD, consistent
  1811. with the symbolic name types and IP addresses used to identify SPD
  1812. entries. The ID for each entry acts as the index for the PAD, i.e.,
  1813. it is the value used to select an entry. All of these ID types can
  1814. be used to match IKE ID payload types. The six types are:
  1815. o DNS name (specific or partial)
  1816. o Distinguished Name (complete or sub-tree constrained)
  1817. o RFC 822 email address (complete or partially qualified)
  1818. o IPv4 address (range)
  1819. o IPv6 address (range)
  1820. o Key ID (exact match only)
  1821. The first three name types can accommodate sub-tree matching as well
  1822. as exact matches. A DNS name may be fully qualified and thus match
  1823. exactly one name, e.g., foo.example.com. Alternatively, the name may
  1824. encompass a group of peers by being partially specified, e.g., the
  1825. string ".example.com" could be used to match any DNS name ending in
  1826. these two domain name components.
  1827. Kent & Seo Standards Track [Page 44]
  1828. RFC 4301 Security Architecture for IP December 2005
  1829. Similarly, a Distinguished Name may specify a complete Distinguished
  1830. Name to match exactly one entry, e.g., CN = Stephen, O = BBN
  1831. Technologies, SP = MA, C = US. Alternatively, an entry may encompass
  1832. a group of peers by specifying a sub-tree, e.g., an entry of the form
  1833. "C = US, SP = MA" might be used to match all DNs that contain these
  1834. two attributes as the top two Relative Distinguished Names (RDNs).
  1835. For an RFC 822 e-mail addresses, the same options exist. A complete
  1836. address such as foo@example.com matches one entity, but a sub-tree
  1837. name such as "@example.com" could be used to match all the entities
  1838. with names ending in those two domain names to the right of the @.
  1839. The specific syntax used by an implementation to accommodate sub-tree
  1840. matching for distinguished names, domain names or RFC 822 e-mail
  1841. addresses is a local matter. But, at a minimum, sub-tree matching of
  1842. the sort described above MUST be supported. (Substring matching
  1843. within a DN, DNS name, or RFC 822 address MAY be supported, but is
  1844. not required.)
  1845. For IPv4 and IPv6 addresses, the same address range syntax used for
  1846. SPD entries MUST be supported. This allows specification of an
  1847. individual address (via a trivial range), an address prefix (by
  1848. choosing a range that adheres to Classless Inter-Domain Routing
  1849. (CIDR)-style prefixes), or an arbitrary address range.
  1850. The Key ID field is defined as an OCTET string in IKE. For this name
  1851. type, only exact-match syntax MUST be supported (since there is no
  1852. explicit structure for this ID type). Additional matching functions
  1853. MAY be supported for this ID type.
  1854. 4.4.3.2. IKE Peer Authentication Data
  1855. Once an entry is located based on an ordered search of the PAD based
  1856. on ID field matching, it is necessary to verify the asserted
  1857. identity, i.e., to authenticate the asserted ID. For each PAD entry,
  1858. there is an indication of the type of authentication to be performed.
  1859. This document requires support for two required authentication data
  1860. types:
  1861. - X.509 certificate
  1862. - pre-shared secret
  1863. For authentication based on an X.509 certificate, the PAD entry
  1864. contains a trust anchor via which the end entity (EE) certificate for
  1865. the peer must be verifiable, either directly or via a certificate
  1866. path. See RFC 3280 for the definition of a trust anchor. An entry
  1867. used with certificate-based authentication MAY include additional
  1868. data to facilitate certificate revocation status, e.g., a list of
  1869. Kent & Seo Standards Track [Page 45]
  1870. RFC 4301 Security Architecture for IP December 2005
  1871. appropriate OCSP responders or CRL repositories, and associated
  1872. authentication data. For authentication based on a pre-shared
  1873. secret, the PAD contains the pre-shared secret to be used by IKE.
  1874. This document does not require that the IKE ID asserted by a peer be
  1875. syntactically related to a specific field in an end entity
  1876. certificate that is employed to authenticate the identity of that
  1877. peer. However, it often will be appropriate to impose such a
  1878. requirement, e.g., when a single entry represents a set of peers each
  1879. of whom may have a distinct SPD entry. Thus, implementations MUST
  1880. provide a means for an administrator to require a match between an
  1881. asserted IKE ID and the subject name or subject alt name in a
  1882. certificate. The former is applicable to IKE IDs expressed as
  1883. distinguished names; the latter is appropriate for DNS names, RFC 822
  1884. e-mail addresses, and IP addresses. Since KEY ID is intended for
  1885. identifying a peer authenticated via a pre-shared secret, there is no
  1886. requirement to match this ID type to a certificate field.
  1887. See IKEv1 [HarCar98] and IKEv2 [Kau05] for details of how IKE
  1888. performs peer authentication using certificates or pre-shared
  1889. secrets.
  1890. This document does not mandate support for any other authentication
  1891. methods, although such methods MAY be employed.
  1892. 4.4.3.3. Child SA Authorization Data
  1893. Once an IKE peer is authenticated, child SAs may be created. Each
  1894. PAD entry contains data to constrain the set of IDs that can be
  1895. asserted by an IKE peer, for matching against the SPD. Each PAD
  1896. entry indicates whether the IKE ID is to be used as a symbolic name
  1897. for SPD matching, or whether an IP address asserted in a traffic
  1898. selector payload is to be used.
  1899. If the entry indicates that the IKE ID is to be used, then the PAD
  1900. entry ID field defines the authorized set of IDs. If the entry
  1901. indicates that child SAs traffic selectors are to be used, then an
  1902. additional data element is required, in the form of IPv4 and/or IPv6
  1903. address ranges. (A peer may be authorized for both address types, so
  1904. there MUST be provision for both a v4 and a v6 address range.)
  1905. 4.4.3.4. How the PAD Is Used
  1906. During the initial IKE exchange, the initiator and responder each
  1907. assert their identity via the IKE ID payload and send an AUTH payload
  1908. to verify the asserted identity. One or more CERT payloads may be
  1909. transmitted to facilitate the verification of each asserted identity.
  1910. Kent & Seo Standards Track [Page 46]
  1911. RFC 4301 Security Architecture for IP December 2005
  1912. When an IKE entity receives an IKE ID payload, it uses the asserted
  1913. ID to locate an entry in the PAD, using the matching rules described
  1914. above. The PAD entry specifies the authentication method to be
  1915. employed for the identified peer. This ensures that the right method
  1916. is used for each peer and that different methods can be used for
  1917. different peers. The entry also specifies the authentication data
  1918. that will be used to verify the asserted identity. This data is
  1919. employed in conjunction with the specified method to authenticate the
  1920. peer, before any CHILD SAs are created.
  1921. Child SAs are created based on the exchange of traffic selector
  1922. payloads, either at the end of the initial IKE exchange or in
  1923. subsequent CREATE_CHILD_SA exchanges. The PAD entry for the (now
  1924. authenticated) IKE peer is used to constrain creation of child SAs;
  1925. specifically, the PAD entry specifies how the SPD is searched using a
  1926. traffic selector proposal from a peer. There are two choices: either
  1927. the IKE ID asserted by the peer is used to find an SPD entry via its
  1928. symbolic name, or peer IP addresses asserted in traffic selector
  1929. payloads are used for SPD lookups based on the remote IP address
  1930. field portion of an SPD entry. It is necessary to impose these
  1931. constraints on creation of child SAs to prevent an authenticated peer
  1932. from spoofing IDs associated with other, legitimate peers.
  1933. Note that because the PAD is checked before searching for an SPD
  1934. entry, this safeguard protects an initiator against spoofing attacks.
  1935. For example, assume that IKE A receives an outbound packet destined
  1936. for IP address X, a host served by a security gateway. RFC 2401
  1937. [RFC2401] and this document do not specify how A determines the
  1938. address of the IKE peer serving X. However, any peer contacted by A
  1939. as the presumed representative for X must be registered in the PAD in
  1940. order to allow the IKE exchange to be authenticated. Moreover, when
  1941. the authenticated peer asserts that it represents X in its traffic
  1942. selector exchange, the PAD will be consulted to determine if the peer
  1943. in question is authorized to represent X. Thus, the PAD provides a
  1944. binding of address ranges (or name sub-spaces) to peers, to counter
  1945. such attacks.
  1946. 4.5. SA and Key Management
  1947. All IPsec implementations MUST support both manual and automated SA
  1948. and cryptographic key management. The IPsec protocols, AH and ESP,
  1949. are largely independent of the associated SA management techniques,
  1950. although the techniques involved do affect some of the security
  1951. services offered by the protocols. For example, the optional
  1952. anti-replay service available for AH and ESP requires automated SA
  1953. management. Moreover, the granularity of key distribution employed
  1954. with IPsec determines the granularity of authentication provided. In
  1955. general, data origin authentication in AH and ESP is limited by the
  1956. Kent & Seo Standards Track [Page 47]
  1957. RFC 4301 Security Architecture for IP December 2005
  1958. extent to which secrets used with the integrity algorithm (or with a
  1959. key management protocol that creates such secrets) are shared among
  1960. multiple possible sources.
  1961. The following text describes the minimum requirements for both types
  1962. of SA management.
  1963. 4.5.1. Manual Techniques
  1964. The simplest form of management is manual management, in which a
  1965. person manually configures each system with keying material and SA
  1966. management data relevant to secure communication with other systems.
  1967. Manual techniques are practical in small, static environments but
  1968. they do not scale well. For example, a company could create a
  1969. virtual private network (VPN) using IPsec in security gateways at
  1970. several sites. If the number of sites is small, and since all the
  1971. sites come under the purview of a single administrative domain, this
  1972. might be a feasible context for manual management techniques. In
  1973. this case, the security gateway might selectively protect traffic to
  1974. and from other sites within the organization using a manually
  1975. configured key, while not protecting traffic for other destinations.
  1976. It also might be appropriate when only selected communications need
  1977. to be secured. A similar argument might apply to use of IPsec
  1978. entirely within an organization for a small number of hosts and/or
  1979. gateways. Manual management techniques often employ statically
  1980. configured, symmetric keys, though other options also exist.
  1981. 4.5.2. Automated SA and Key Management
  1982. Widespread deployment and use of IPsec requires an Internet-standard,
  1983. scalable, automated, SA management protocol. Such support is
  1984. required to facilitate use of the anti-replay features of AH and ESP,
  1985. and to accommodate on-demand creation of SAs, e.g., for user- and
  1986. session-oriented keying. (Note that the notion of "rekeying" an SA
  1987. actually implies creation of a new SA with a new SPI, a process that
  1988. generally implies use of an automated SA/key management protocol.)
  1989. The default automated key management protocol selected for use with
  1990. IPsec is IKEv2 [Kau05]. This document assumes the availability of
  1991. certain functions from the key management protocol that are not
  1992. supported by IKEv1. Other automated SA management protocols MAY be
  1993. employed.
  1994. When an automated SA/key management protocol is employed, the output
  1995. from this protocol is used to generate multiple keys for a single SA.
  1996. This also occurs because distinct keys are used for each of the two
  1997. Kent & Seo Standards Track [Page 48]
  1998. RFC 4301 Security Architecture for IP December 2005
  1999. SAs created by IKE. If both integrity and confidentiality are
  2000. employed, then a minimum of four keys are required. Additionally,
  2001. some cryptographic algorithms may require multiple keys, e.g., 3DES.
  2002. The Key Management System may provide a separate string of bits for
  2003. each key or it may generate one string of bits from which all keys
  2004. are extracted. If a single string of bits is provided, care needs to
  2005. be taken to ensure that the parts of the system that map the string
  2006. of bits to the required keys do so in the same fashion at both ends
  2007. of the SA. To ensure that the IPsec implementations at each end of
  2008. the SA use the same bits for the same keys, and irrespective of which
  2009. part of the system divides the string of bits into individual keys,
  2010. the encryption keys MUST be taken from the first (left-most,
  2011. high-order) bits and the integrity keys MUST be taken from the
  2012. remaining bits. The number of bits for each key is defined in the
  2013. relevant cryptographic algorithm specification RFC. In the case of
  2014. multiple encryption keys or multiple integrity keys, the
  2015. specification for the cryptographic algorithm must specify the order
  2016. in which they are to be selected from a single string of bits
  2017. provided to the cryptographic algorithm.
  2018. 4.5.3. Locating a Security Gateway
  2019. This section discusses issues relating to how a host learns about the
  2020. existence of relevant security gateways and, once a host has
  2021. contacted these security gateways, how it knows that these are the
  2022. correct security gateways. The details of where the required
  2023. information is stored is a local matter, but the Peer Authorization
  2024. Database (PAD) described in Section 4.4 is the most likely candidate.
  2025. (Note: S* indicates a system that is running IPsec, e.g., SH1 and SG2
  2026. below.)
  2027. Consider a situation in which a remote host (SH1) is using the
  2028. Internet to gain access to a server or other machine (H2) and there
  2029. is a security gateway (SG2), e.g., a firewall, through which H1's
  2030. traffic must pass. An example of this situation would be a mobile
  2031. host crossing the Internet to his home organization's firewall (SG2).
  2032. This situation raises several issues:
  2033. 1. How does SH1 know/learn about the existence of the security
  2034. gateway SG2?
  2035. 2. How does it authenticate SG2, and once it has authenticated SG2,
  2036. how does it confirm that SG2 has been authorized to represent H2?
  2037. 3. How does SG2 authenticate SH1 and verify that SH1 is authorized to
  2038. contact H2?
  2039. Kent & Seo Standards Track [Page 49]
  2040. RFC 4301 Security Architecture for IP December 2005
  2041. 4. How does SH1 know/learn about any additional gateways that provide
  2042. alternate paths to H2?
  2043. To address these problems, an IPsec-supporting host or security
  2044. gateway MUST have an administrative interface that allows the
  2045. user/administrator to configure the address of one or more security
  2046. gateways for ranges of destination addresses that require its use.
  2047. This includes the ability to configure information for locating and
  2048. authenticating one or more security gateways and verifying the
  2049. authorization of these gateways to represent the destination host.
  2050. (The authorization function is implied in the PAD.) This document
  2051. does not address the issue of how to automate the
  2052. discovery/verification of security gateways.
  2053. 4.6. SAs and Multicast
  2054. The receiver-orientation of the SA implies that, in the case of
  2055. unicast traffic, the destination system will select the SPI value.
  2056. By having the destination select the SPI value, there is no potential
  2057. for manually configured SAs to conflict with automatically configured
  2058. (e.g., via a key management protocol) SAs or for SAs from multiple
  2059. sources to conflict with each other. For multicast traffic, there
  2060. are multiple destination systems associated with a single SA. So
  2061. some system or person will need to coordinate among all multicast
  2062. groups to select an SPI or SPIs on behalf of each multicast group and
  2063. then communicate the group's IPsec information to all of the
  2064. legitimate members of that multicast group via mechanisms not defined
  2065. here.
  2066. Multiple senders to a multicast group SHOULD use a single Security
  2067. Association (and hence SPI) for all traffic to that group when a
  2068. symmetric key encryption or integrity algorithm is employed. In such
  2069. circumstances, the receiver knows only that the message came from a
  2070. system possessing the key for that multicast group. In such
  2071. circumstances, a receiver generally will not be able to authenticate
  2072. which system sent the multicast traffic. Specifications for other,
  2073. more general multicast approaches are deferred to the IETF Multicast
  2074. Security Working Group.
  2075. 5. IP Traffic Processing
  2076. As mentioned in Section 4.4.1, "The Security Policy Database (SPD)",
  2077. the SPD (or associated caches) MUST be consulted during the
  2078. processing of all traffic that crosses the IPsec protection boundary,
  2079. including IPsec management traffic. If no policy is found in the SPD
  2080. that matches a packet (for either inbound or outbound traffic), the
  2081. packet MUST be discarded. To simplify processing, and to allow for
  2082. very fast SA lookups (for SG/BITS/BITW), this document introduces the
  2083. Kent & Seo Standards Track [Page 50]
  2084. RFC 4301 Security Architecture for IP December 2005
  2085. notion of an SPD cache for all outbound traffic (SPD-O plus SPD-S),
  2086. and a cache for inbound, non-IPsec-protected traffic (SPD-I). (As
  2087. mentioned earlier, the SAD acts as a cache for checking the selectors
  2088. of inbound IPsec-protected traffic arriving on SAs.) There is
  2089. nominally one cache per SPD. For the purposes of this specification,
  2090. it is assumed that each cached entry will map to exactly one SA.
  2091. Note, however, exceptions arise when one uses multiple SAs to carry
  2092. traffic of different priorities (e.g., as indicated by distinct DSCP
  2093. values) but the same selectors. Note also, that there are a couple
  2094. of situations in which the SAD can have entries for SAs that do not
  2095. have corresponding entries in the SPD. Since this document does not
  2096. mandate that the SAD be selectively cleared when the SPD is changed,
  2097. SAD entries can remain when the SPD entries that created them are
  2098. changed or deleted. Also, if a manually keyed SA is created, there
  2099. could be an SAD entry for this SA that does not correspond to any SPD
  2100. entry.
  2101. Since SPD entries may overlap, one cannot safely cache these entries
  2102. in general. Simple caching might result in a match against a cache
  2103. entry, whereas an ordered search of the SPD would have resulted in a
  2104. match against a different entry. But, if the SPD entries are first
  2105. decorrelated, then the resulting entries can safely be cached. Each
  2106. cached entry will indicate that matching traffic should be bypassed
  2107. or discarded, appropriately. (Note: The original SPD entry might
  2108. result in multiple SAs, e.g., because of PFP.) Unless otherwise
  2109. noted, all references below to the "SPD" or "SPD cache" or "cache"
  2110. are to a decorrelated SPD (SPD-I, SPD-O, SPD-S) or the SPD cache
  2111. containing entries from the decorrelated SPD.
  2112. Note: In a host IPsec implementation based on sockets, the SPD will
  2113. be consulted whenever a new socket is created to determine what, if
  2114. any, IPsec processing will be applied to the traffic that will flow
  2115. on that socket. This provides an implicit caching mechanism, and the
  2116. portions of the preceding discussion that address caching can be
  2117. ignored in such implementations.
  2118. Note: It is assumed that one starts with a correlated SPD because
  2119. that is how users and administrators are accustomed to managing these
  2120. sorts of access control lists or firewall filter rules. Then the
  2121. decorrelation algorithm is applied to build a list of cache-able SPD
  2122. entries. The decorrelation is invisible at the management interface.
  2123. For inbound IPsec traffic, the SAD entry selected by the SPI serves
  2124. as the cache for the selectors to be matched against arriving IPsec
  2125. packets, after AH or ESP processing has been performed.
  2126. Kent & Seo Standards Track [Page 51]
  2127. RFC 4301 Security Architecture for IP December 2005
  2128. 5.1. Outbound IP Traffic Processing (protected-to-unprotected)
  2129. First consider the path for traffic entering the implementation via a
  2130. protected interface and exiting via an unprotected interface.
  2131. Unprotected Interface
  2132. ^
  2133. |
  2134. (nested SAs) +----------+
  2135. -------------------|Forwarding|<-----+
  2136. | +----------+ |
  2137. | ^ |
  2138. | | BYPASS |
  2139. V +-----+ |
  2140. +-------+ | SPD | +--------+
  2141. ...| SPD-I |.................|Cache|.....|PROCESS |...IPsec
  2142. | (*) | | (*) |---->|(AH/ESP)| boundary
  2143. +-------+ +-----+ +--------+
  2144. | +-------+ / ^
  2145. | |DISCARD| <--/ |
  2146. | +-------+ |
  2147. | |
  2148. | +-------------+
  2149. |---------------->|SPD Selection|
  2150. +-------------+
  2151. ^
  2152. | +------+
  2153. | -->| ICMP |
  2154. | / +------+
  2155. |/
  2156. |
  2157. |
  2158. Protected Interface
  2159. Figure 2. Processing Model for Outbound Traffic
  2160. (*) = The SPD caches are shown here. If there
  2161. is a cache miss, then the SPD is checked.
  2162. There is no requirement that an
  2163. implementation buffer the packet if
  2164. there is a cache miss.
  2165. Kent & Seo Standards Track [Page 52]
  2166. RFC 4301 Security Architecture for IP December 2005
  2167. IPsec MUST perform the following steps when processing outbound
  2168. packets:
  2169. 1. When a packet arrives from the subscriber (protected) interface,
  2170. invoke the SPD selection function to obtain the SPD-ID needed to
  2171. choose the appropriate SPD. (If the implementation uses only one
  2172. SPD, this step is a no-op.)
  2173. 2. Match the packet headers against the cache for the SPD specified
  2174. by the SPD-ID from step 1. Note that this cache contains entries
  2175. from SPD-O and SPD-S.
  2176. 3a. If there is a match, then process the packet as specified by the
  2177. matching cache entry, i.e., BYPASS, DISCARD, or PROTECT using AH
  2178. or ESP. If IPsec processing is applied, there is a link from the
  2179. SPD cache entry to the relevant SAD entry (specifying the mode,
  2180. cryptographic algorithms, keys, SPI, PMTU, etc.). IPsec
  2181. processing is as previously defined, for tunnel or transport
  2182. modes and for AH or ESP, as specified in their respective RFCs
  2183. [Ken05b, Ken05a]. Note that the SA PMTU value, plus the value of
  2184. the stateful fragment checking flag (and the DF bit in the IP
  2185. header of the outbound packet) determine whether the packet can
  2186. (must) be fragmented prior to or after IPsec processing, or if it
  2187. must be discarded and an ICMP PMTU message is sent.
  2188. 3b. If no match is found in the cache, search the SPD (SPD-S and
  2189. SPD-O parts) specified by SPD-ID. If the SPD entry calls for
  2190. BYPASS or DISCARD, create one or more new outbound SPD cache
  2191. entries and if BYPASS, create one or more new inbound SPD cache
  2192. entries. (More than one cache entry may be created since a
  2193. decorrelated SPD entry may be linked to other such entries that
  2194. were created as a side effect of the decorrelation process.) If
  2195. the SPD entry calls for PROTECT, i.e., creation of an SA, the key
  2196. management mechanism (e.g., IKEv2) is invoked to create the SA.
  2197. If SA creation succeeds, a new outbound (SPD-S) cache entry is
  2198. created, along with outbound and inbound SAD entries, otherwise
  2199. the packet is discarded. (A packet that triggers an SPD lookup
  2200. MAY be discarded by the implementation, or it MAY be processed
  2201. against the newly created cache entry, if one is created.) Since
  2202. SAs are created in pairs, an SAD entry for the corresponding
  2203. inbound SA also is created, and it contains the selector values
  2204. derived from the SPD entry (and packet, if any PFP flags were
  2205. "true") used to create the inbound SA, for use in checking
  2206. inbound traffic delivered via the SA.
  2207. 4. The packet is passed to the outbound forwarding function
  2208. (operating outside of the IPsec implementation), to select the
  2209. interface to which the packet will be directed. This function
  2210. Kent & Seo Standards Track [Page 53]
  2211. RFC 4301 Security Architecture for IP December 2005
  2212. may cause the packet to be passed back across the IPsec boundary,
  2213. for additional IPsec processing, e.g., in support of nested SAs.
  2214. If so, there MUST be an entry in SPD-I database that permits
  2215. inbound bypassing of the packet, otherwise the packet will be
  2216. discarded. If necessary, i.e., if there is more than one SPD-I,
  2217. the traffic being looped back MAY be tagged as coming from this
  2218. internal interface. This would allow the use of a different
  2219. SPD-I for "real" external traffic vs. looped traffic, if needed.
  2220. Note: With the exception of IPv4 and IPv6 transport mode, an SG,
  2221. BITS, or BITW implementation MAY fragment packets before applying
  2222. IPsec. (This applies only to IPv4. For IPv6 packets, only the
  2223. originator is allowed to fragment them.) The device SHOULD have a
  2224. configuration setting to disable this. The resulting fragments are
  2225. evaluated against the SPD in the normal manner. Thus, fragments not
  2226. containing port numbers (or ICMP message type and code, or Mobility
  2227. Header type) will only match rules having port (or ICMP message type
  2228. and code, or MH type) selectors of OPAQUE or ANY. (See Section 7 for
  2229. more details.)
  2230. Note: With regard to determining and enforcing the PMTU of an SA, the
  2231. IPsec system MUST follow the steps described in Section 8.2.
  2232. 5.1.1. Handling an Outbound Packet That Must Be Discarded
  2233. If an IPsec system receives an outbound packet that it finds it must
  2234. discard, it SHOULD be capable of generating and sending an ICMP
  2235. message to indicate to the sender of the outbound packet that the
  2236. packet was discarded. The type and code of the ICMP message will
  2237. depend on the reason for discarding the packet, as specified below.
  2238. The reason SHOULD be recorded in the audit log. The audit log entry
  2239. for this event SHOULD include the reason, current date/time, and the
  2240. selector values from the packet.
  2241. a. The selectors of the packet matched an SPD entry requiring the
  2242. packet to be discarded.
  2243. IPv4 Type = 3 (destination unreachable) Code = 13
  2244. (Communication Administratively Prohibited)
  2245. IPv6 Type = 1 (destination unreachable) Code = 1
  2246. (Communication with destination administratively
  2247. prohibited)
  2248. b1. The IPsec system successfully reached the remote peer but was
  2249. unable to negotiate the SA required by the SPD entry matching the
  2250. packet because, for example, the remote peer is administratively
  2251. prohibited from communicating with the initiator, the initiating
  2252. Kent & Seo Standards Track [Page 54]
  2253. RFC 4301 Security Architecture for IP December 2005
  2254. peer was unable to authenticate itself to the remote peer, the
  2255. remote peer was unable to authenticate itself to the initiating
  2256. peer, or the SPD at the remote peer did not have a suitable
  2257. entry.
  2258. IPv4 Type = 3 (destination unreachable) Code = 13
  2259. (Communication Administratively Prohibited)
  2260. IPv6 Type = 1 (destination unreachable) Code = 1
  2261. (Communication with destination administratively
  2262. prohibited)
  2263. b2. The IPsec system was unable to set up the SA required by the SPD
  2264. entry matching the packet because the IPsec peer at the other end
  2265. of the exchange could not be contacted.
  2266. IPv4 Type = 3 (destination unreachable) Code = 1 (host
  2267. unreachable)
  2268. IPv6 Type = 1 (destination unreachable) Code = 3 (address
  2269. unreachable)
  2270. Note that an attacker behind a security gateway could send packets
  2271. with a spoofed source address, W.X.Y.Z, to an IPsec entity causing it
  2272. to send ICMP messages to W.X.Y.Z. This creates an opportunity for a
  2273. denial of service (DoS) attack among hosts behind a security gateway.
  2274. To address this, a security gateway SHOULD include a management
  2275. control to allow an administrator to configure an IPsec
  2276. implementation to send or not send the ICMP messages under these
  2277. circumstances, and if this facility is selected, to rate limit the
  2278. transmission of such ICMP responses.
  2279. 5.1.2. Header Construction for Tunnel Mode
  2280. This section describes the handling of the inner and outer IP
  2281. headers, extension headers, and options for AH and ESP tunnels, with
  2282. regard to outbound traffic processing. This includes how to
  2283. construct the encapsulating (outer) IP header, how to process fields
  2284. in the inner IP header, and what other actions should be taken for
  2285. outbound, tunnel mode traffic. The general processing described here
  2286. is modeled after RFC 2003, "IP Encapsulation within IP" [Per96]:
  2287. o The outer IP header Source Address and Destination Address
  2288. identify the "endpoints" of the tunnel (the encapsulator and
  2289. decapsulator). The inner IP header Source Address and Destination
  2290. Addresses identify the original sender and recipient of the
  2291. datagram (from the perspective of this tunnel), respectively.
  2292. Kent & Seo Standards Track [Page 55]
  2293. RFC 4301 Security Architecture for IP December 2005
  2294. (See footnote 3 after the table in 5.1.2.1 for more details on the
  2295. encapsulating source IP address.)
  2296. o The inner IP header is not changed except as noted below for TTL
  2297. (or Hop Limit) and the DS/ECN Fields. The inner IP header
  2298. otherwise remains unchanged during its delivery to the tunnel exit
  2299. point.
  2300. o No change to IP options or extension headers in the inner header
  2301. occurs during delivery of the encapsulated datagram through the
  2302. tunnel.
  2303. Note: IPsec tunnel mode is different from IP-in-IP tunneling (RFC
  2304. 2003 [Per96]) in several ways:
  2305. o IPsec offers certain controls to a security administrator to
  2306. manage covert channels (which would not normally be a concern for
  2307. tunneling) and to ensure that the receiver examines the right
  2308. portions of the received packet with respect to application of
  2309. access controls. An IPsec implementation MAY be configurable with
  2310. regard to how it processes the outer DS field for tunnel mode for
  2311. transmitted packets. For outbound traffic, one configuration
  2312. setting for the outer DS field will operate as described in the
  2313. following sections on IPv4 and IPv6 header processing for IPsec
  2314. tunnels. Another will allow the outer DS field to be mapped to a
  2315. fixed value, which MAY be configured on a per-SA basis. (The value
  2316. might really be fixed for all traffic outbound from a device, but
  2317. per-SA granularity allows that as well.) This configuration option
  2318. allows a local administrator to decide whether the covert channel
  2319. provided by copying these bits outweighs the benefits of copying.
  2320. o IPsec describes how to handle ECN or DS and provides the ability
  2321. to control propagation of changes in these fields between
  2322. unprotected and protected domains. In general, propagation from a
  2323. protected to an unprotected domain is a covert channel and thus
  2324. controls are provided to manage the bandwidth of this channel.
  2325. Propagation of ECN values in the other direction are controlled so
  2326. that only legitimate ECN changes (indicating occurrence of
  2327. congestion between the tunnel endpoints) are propagated. By
  2328. default, DS propagation from an unprotected domain to a protected
  2329. domain is not permitted. However, if the sender and receiver do
  2330. not share the same DS code space, and the receiver has no way of
  2331. learning how to map between the two spaces, then it may be
  2332. appropriate to deviate from the default. Specifically, an IPsec
  2333. implementation MAY be configurable in terms of how it processes
  2334. the outer DS field for tunnel mode for received packets. It may
  2335. be configured to either discard the outer DS value (the default)
  2336. OR to overwrite the inner DS field with the outer DS field. If
  2337. Kent & Seo Standards Track [Page 56]
  2338. RFC 4301 Security Architecture for IP December 2005
  2339. offered, the discard vs. overwrite behavior MAY be configured on a
  2340. per-SA basis. This configuration option allows a local
  2341. administrator to decide whether the vulnerabilities created by
  2342. copying these bits outweigh the benefits of copying. See
  2343. [RFC2983] for further information on when each of these behaviors
  2344. may be useful, and also for the possible need for diffserv traffic
  2345. conditioning prior or subsequent to IPsec processing (including
  2346. tunnel decapsulation).
  2347. o IPsec allows the IP version of the encapsulating header to be
  2348. different from that of the inner header.
  2349. The tables in the following sub-sections show the handling for the
  2350. different header/option fields ("constructed" means that the value in
  2351. the outer field is constructed independently of the value in the
  2352. inner).
  2353. 5.1.2.1. IPv4: Header Construction for Tunnel Mode
  2354. <-- How Outer Hdr Relates to Inner Hdr -->
  2355. Outer Hdr at Inner Hdr at
  2356. IPv4 Encapsulator Decapsulator
  2357. Header fields: -------------------- ------------
  2358. version 4 (1) no change
  2359. header length constructed no change
  2360. DS Field copied from inner hdr (5) no change
  2361. ECN Field copied from inner hdr constructed (6)
  2362. total length constructed no change
  2363. ID constructed no change
  2364. flags (DF,MF) constructed, DF (4) no change
  2365. fragment offset constructed no change
  2366. TTL constructed (2) decrement (2)
  2367. protocol AH, ESP no change
  2368. checksum constructed constructed (2)(6)
  2369. src address constructed (3) no change
  2370. dest address constructed (3) no change
  2371. Options never copied no change
  2372. Notes:
  2373. (1) The IP version in the encapsulating header can be different
  2374. from the value in the inner header.
  2375. (2) The TTL in the inner header is decremented by the encapsulator
  2376. prior to forwarding and by the decapsulator if it forwards the
  2377. packet. (The IPv4 checksum changes when the TTL changes.)
  2378. Kent & Seo Standards Track [Page 57]
  2379. RFC 4301 Security Architecture for IP December 2005
  2380. Note: Decrementing the TTL value is a normal part of
  2381. forwarding a packet. Thus, a packet originating from the same
  2382. node as the encapsulator does not have its TTL decremented,
  2383. since the sending node is originating the packet rather than
  2384. forwarding it. This applies to BITS and native IPsec
  2385. implementations in hosts and routers. However, the IPsec
  2386. processing model includes an external forwarding capability.
  2387. TTL processing can be used to prevent looping of packets,
  2388. e.g., due to configuration errors, within the context of this
  2389. processing model.
  2390. (3) Local and Remote addresses depend on the SA, which is used to
  2391. determine the Remote address, which in turn determines which
  2392. Local address (net interface) is used to forward the packet.
  2393. Note: For multicast traffic, the destination address, or
  2394. source and destination addresses, may be required for
  2395. demuxing. In that case, it is important to ensure consistency
  2396. over the lifetime of the SA by ensuring that the source
  2397. address that appears in the encapsulating tunnel header is the
  2398. same as the one that was negotiated during the SA
  2399. establishment process. There is an exception to this general
  2400. rule, i.e., a mobile IPsec implementation will update its
  2401. source address as it moves.
  2402. (4) Configuration determines whether to copy from the inner header
  2403. (IPv4 only), clear, or set the DF.
  2404. (5) If the packet will immediately enter a domain for which the
  2405. DSCP value in the outer header is not appropriate, that value
  2406. MUST be mapped to an appropriate value for the domain
  2407. [NiBlBaBL98]. See RFC 2475 [BBCDWW98] for further
  2408. information.
  2409. (6) If the ECN field in the inner header is set to ECT(0) or
  2410. ECT(1), where ECT is ECN-Capable Transport (ECT), and if the
  2411. ECN field in the outer header is set to Congestion Experienced
  2412. (CE), then set the ECN field in the inner header to CE;
  2413. otherwise, make no change to the ECN field in the inner
  2414. header. (The IPv4 checksum changes when the ECN changes.)
  2415. Note: IPsec does not copy the options from the inner header into the
  2416. outer header, nor does IPsec construct the options in the outer
  2417. header. However, post-IPsec code MAY insert/construct options for
  2418. the outer header.
  2419. Kent & Seo Standards Track [Page 58]
  2420. RFC 4301 Security Architecture for IP December 2005
  2421. 5.1.2.2. IPv6: Header Construction for Tunnel Mode
  2422. <-- How Outer Hdr Relates Inner Hdr --->
  2423. Outer Hdr at Inner Hdr at
  2424. IPv6 Encapsulator Decapsulator
  2425. Header fields: -------------------- ------------
  2426. version 6 (1) no change
  2427. DS Field copied from inner hdr (5) no change (9)
  2428. ECN Field copied from inner hdr constructed (6)
  2429. flow label copied or configured (8) no change
  2430. payload length constructed no change
  2431. next header AH,ESP,routing hdr no change
  2432. hop limit constructed (2) decrement (2)
  2433. src address constructed (3) no change
  2434. dest address constructed (3) no change
  2435. Extension headers never copied (7) no change
  2436. Notes:
  2437. (1) - (6) See Section 5.1.2.1.
  2438. (7) IPsec does not copy the extension headers from the inner
  2439. packet into outer headers, nor does IPsec construct extension
  2440. headers in the outer header. However, post-IPsec code MAY
  2441. insert/construct extension headers for the outer header.
  2442. (8) See [RaCoCaDe04]. Copying is acceptable only for end systems,
  2443. not SGs. If an SG copied flow labels from the inner header to
  2444. the outer header, collisions might result.
  2445. (9) An implementation MAY choose to provide a facility to pass the
  2446. DS value from the outer header to the inner header, on a per-
  2447. SA basis, for received tunnel mode packets. The motivation
  2448. for providing this feature is to accommodate situations in
  2449. which the DS code space at the receiver is different from that
  2450. of the sender and the receiver has no way of knowing how to
  2451. translate from the sender's space. There is a danger in
  2452. copying this value from the outer header to the inner header,
  2453. since it enables an attacker to modify the outer DSCP value in
  2454. a fashion that may adversely affect other traffic at the
  2455. receiver. Hence the default behavior for IPsec
  2456. implementations is NOT to permit such copying.
  2457. 5.2. Processing Inbound IP Traffic (unprotected-to-protected)
  2458. Inbound processing is somewhat different from outbound processing,
  2459. because of the use of SPIs to map IPsec-protected traffic to SAs.
  2460. The inbound SPD cache (SPD-I) is applied only to bypassed or
  2461. Kent & Seo Standards Track [Page 59]
  2462. RFC 4301 Security Architecture for IP December 2005
  2463. discarded traffic. If an arriving packet appears to be an IPsec
  2464. fragment from an unprotected interface, reassembly is performed prior
  2465. to IPsec processing. The intent for any SPD cache is that a packet
  2466. that fails to match any entry is then referred to the corresponding
  2467. SPD. Every SPD SHOULD have a nominal, final entry that catches
  2468. anything that is otherwise unmatched, and discards it. This ensures
  2469. that non-IPsec-protected traffic that arrives and does not match any
  2470. SPD-I entry will be discarded.
  2471. Unprotected Interface
  2472. |
  2473. V
  2474. +-----+ IPsec protected
  2475. ------------------->|Demux|-------------------+
  2476. | +-----+ |
  2477. | | |
  2478. | Not IPsec | |
  2479. | | |
  2480. | V |
  2481. | +-------+ +---------+ |
  2482. | |DISCARD|<---|SPD-I (*)| |
  2483. | +-------+ +---------+ |
  2484. | | |
  2485. | |-----+ |
  2486. | | | |
  2487. | | V |
  2488. | | +------+ |
  2489. | | | ICMP | |
  2490. | | +------+ |
  2491. | | V
  2492. +---------+ | +-----------+
  2493. ....|SPD-O (*)|............|...................|PROCESS(**)|...IPsec
  2494. +---------+ | | (AH/ESP) | Boundary
  2495. ^ | +-----------+
  2496. | | +---+ |
  2497. | BYPASS | +-->|IKE| |
  2498. | | | +---+ |
  2499. | V | V
  2500. | +----------+ +---------+ +----+
  2501. |--------<------|Forwarding|<---------|SAD Check|-->|ICMP|
  2502. nested SAs +----------+ | (***) | +----+
  2503. | +---------+
  2504. V
  2505. Protected Interface
  2506. Figure 3. Processing Model for Inbound Traffic
  2507. Kent & Seo Standards Track [Page 60]
  2508. RFC 4301 Security Architecture for IP December 2005
  2509. (*) = The caches are shown here. If there is
  2510. a cache miss, then the SPD is checked.
  2511. There is no requirement that an
  2512. implementation buffer the packet if
  2513. there is a cache miss.
  2514. (**) = This processing includes using the
  2515. packet's SPI, etc., to look up the SA
  2516. in the SAD, which forms a cache of the
  2517. SPD for inbound packets (except for
  2518. cases noted in Sections 4.4.2 and 5).
  2519. See step 3a below.
  2520. (***) = This SAD check refers to step 4 below.
  2521. Prior to performing AH or ESP processing, any IP fragments that
  2522. arrive via the unprotected interface are reassembled (by IP). Each
  2523. inbound IP datagram to which IPsec processing will be applied is
  2524. identified by the appearance of the AH or ESP values in the IP Next
  2525. Protocol field (or of AH or ESP as a next layer protocol in the IPv6
  2526. context).
  2527. IPsec MUST perform the following steps:
  2528. 1. When a packet arrives, it may be tagged with the ID of the
  2529. interface (physical or virtual) via which it arrived, if
  2530. necessary, to support multiple SPDs and associated SPD-I caches.
  2531. (The interface ID is mapped to a corresponding SPD-ID.)
  2532. 2. The packet is examined and demuxed into one of two categories:
  2533. - If the packet appears to be IPsec protected and it is addressed
  2534. to this device, an attempt is made to map it to an active SA
  2535. via the SAD. Note that the device may have multiple IP
  2536. addresses that may be used in the SAD lookup, e.g., in the case
  2537. of protocols such as SCTP.
  2538. - Traffic not addressed to this device, or addressed to this
  2539. device and not AH or ESP, is directed to SPD-I lookup. (This
  2540. implies that IKE traffic MUST have an explicit BYPASS entry in
  2541. the SPD.) If multiple SPDs are employed, the tag assigned to
  2542. the packet in step 1 is used to select the appropriate SPD-I
  2543. (and cache) to search. SPD-I lookup determines whether the
  2544. action is DISCARD or BYPASS.
  2545. 3a. If the packet is addressed to the IPsec device and AH or ESP is
  2546. specified as the protocol, the packet is looked up in the SAD.
  2547. For unicast traffic, use only the SPI (or SPI plus protocol).
  2548. For multicast traffic, use the SPI plus the destination or SPI
  2549. plus destination and source addresses, as specified in Section
  2550. 4.1. In either case (unicast or multicast), if there is no match,
  2551. discard the traffic. This is an auditable event. The audit log
  2552. Kent & Seo Standards Track [Page 61]
  2553. RFC 4301 Security Architecture for IP December 2005
  2554. entry for this event SHOULD include the current date/time, SPI,
  2555. source and destination of the packet, IPsec protocol, and any
  2556. other selector values of the packet that are available. If the
  2557. packet is found in the SAD, process it accordingly (see step 4).
  2558. 3b. If the packet is not addressed to the device or is addressed to
  2559. this device and is not AH or ESP, look up the packet header in
  2560. the (appropriate) SPD-I cache. If there is a match and the
  2561. packet is to be discarded or bypassed, do so. If there is no
  2562. cache match, look up the packet in the corresponding SPD-I and
  2563. create a cache entry as appropriate. (No SAs are created in
  2564. response to receipt of a packet that requires IPsec protection;
  2565. only BYPASS or DISCARD cache entries can be created this way.) If
  2566. there is no match, discard the traffic. This is an auditable
  2567. event. The audit log entry for this event SHOULD include the
  2568. current date/time, SPI if available, IPsec protocol if available,
  2569. source and destination of the packet, and any other selector
  2570. values of the packet that are available.
  2571. 3c. Processing of ICMP messages is assumed to take place on the
  2572. unprotected side of the IPsec boundary. Unprotected ICMP
  2573. messages are examined and local policy is applied to determine
  2574. whether to accept or reject these messages and, if accepted, what
  2575. action to take as a result. For example, if an ICMP unreachable
  2576. message is received, the implementation must decide whether to
  2577. act on it, reject it, or act on it with constraints. (See Section
  2578. 6.)
  2579. 4. Apply AH or ESP processing as specified, using the SAD entry
  2580. selected in step 3a above. Then match the packet against the
  2581. inbound selectors identified by the SAD entry to verify that the
  2582. received packet is appropriate for the SA via which it was
  2583. received.
  2584. 5. If an IPsec system receives an inbound packet on an SA and the
  2585. packet's header fields are not consistent with the selectors for
  2586. the SA, it MUST discard the packet. This is an auditable event.
  2587. The audit log entry for this event SHOULD include the current
  2588. date/time, SPI, IPsec protocol(s), source and destination of the
  2589. packet, any other selector values of the packet that are
  2590. available, and the selector values from the relevant SAD entry.
  2591. The system SHOULD also be capable of generating and sending an
  2592. IKE notification of INVALID_SELECTORS to the sender (IPsec peer),
  2593. indicating that the received packet was discarded because of
  2594. failure to pass selector checks.
  2595. Kent & Seo Standards Track [Page 62]
  2596. RFC 4301 Security Architecture for IP December 2005
  2597. To minimize the impact of a DoS attack, or a mis-configured peer, the
  2598. IPsec system SHOULD include a management control to allow an
  2599. administrator to configure the IPsec implementation to send or not
  2600. send this IKE notification, and if this facility is selected, to rate
  2601. limit the transmission of such notifications.
  2602. After traffic is bypassed or processed through IPsec, it is handed to
  2603. the inbound forwarding function for disposition. This function may
  2604. cause the packet to be sent (outbound) across the IPsec boundary for
  2605. additional inbound IPsec processing, e.g., in support of nested SAs.
  2606. If so, then as with ALL outbound traffic that is to be bypassed, the
  2607. packet MUST be matched against an SPD-O entry. Ultimately, the
  2608. packet should be forwarded to the destination host or process for
  2609. disposition.
  2610. 6. ICMP Processing
  2611. This section describes IPsec handling of ICMP traffic. There are two
  2612. categories of ICMP traffic: error messages (e.g., type = destination
  2613. unreachable) and non-error messages (e.g., type = echo). This
  2614. section applies exclusively to error messages. Disposition of
  2615. non-error, ICMP messages (that are not addressed to the IPsec
  2616. implementation itself) MUST be explicitly accounted for using SPD
  2617. entries.
  2618. The discussion in this section applies to ICMPv6 as well as to
  2619. ICMPv4. Also, a mechanism SHOULD be provided to allow an
  2620. administrator to cause ICMP error messages (selected, all, or none)
  2621. to be logged as an aid to problem diagnosis.
  2622. 6.1. Processing ICMP Error Messages Directed to an IPsec Implementation
  2623. 6.1.1. ICMP Error Messages Received on the Unprotected Side of the
  2624. Boundary
  2625. Figure 3 in Section 5.2 shows a distinct ICMP processing module on
  2626. the unprotected side of the IPsec boundary, for processing ICMP
  2627. messages (error or otherwise) that are addressed to the IPsec device
  2628. and that are not protected via AH or ESP. An ICMP message of this
  2629. sort is unauthenticated, and its processing may result in denial or
  2630. degradation of service. This suggests that, in general, it would be
  2631. desirable to ignore such messages. However, many ICMP messages will
  2632. be received by hosts or security gateways from unauthenticated
  2633. sources, e.g., routers in the public Internet. Ignoring these ICMP
  2634. messages can degrade service, e.g., because of a failure to process
  2635. PMTU message and redirection messages. Thus, there is also a
  2636. motivation for accepting and acting upon unauthenticated ICMP
  2637. messages.
  2638. Kent & Seo Standards Track [Page 63]
  2639. RFC 4301 Security Architecture for IP December 2005
  2640. To accommodate both ends of this spectrum, a compliant IPsec
  2641. implementation MUST permit a local administrator to configure an
  2642. IPsec implementation to accept or reject unauthenticated ICMP
  2643. traffic. This control MUST be at the granularity of ICMP type and
  2644. MAY be at the granularity of ICMP type and code. Additionally, an
  2645. implementation SHOULD incorporate mechanisms and parameters for
  2646. dealing with such traffic. For example, there could be the ability
  2647. to establish a minimum PMTU for traffic (on a per destination basis),
  2648. to prevent receipt of an unauthenticated ICMP from setting the PMTU
  2649. to a trivial size.
  2650. If an ICMP PMTU message passes the checks above and the system is
  2651. configured to accept it, then there are two possibilities. If the
  2652. implementation applies fragmentation on the ciphertext side of the
  2653. boundary, then the accepted PMTU information is passed to the
  2654. forwarding module (outside of the IPsec implementation), which uses
  2655. it to manage outbound packet fragmentation. If the implementation is
  2656. configured to effect plaintext side fragmentation, then the PMTU
  2657. information is passed to the plaintext side and processed as
  2658. described in Section 8.2.
  2659. 6.1.2. ICMP Error Messages Received on the Protected Side of the
  2660. Boundary
  2661. These ICMP messages are not authenticated, but they do come from
  2662. sources on the protected side of the IPsec boundary. Thus, these
  2663. messages generally are viewed as more "trustworthy" than their
  2664. counterparts arriving from sources on the unprotected side of the
  2665. boundary. The major security concern here is that a compromised host
  2666. or router might emit erroneous ICMP error messages that could degrade
  2667. service for other devices "behind" the security gateway, or that
  2668. could even result in violations of confidentiality. For example, if
  2669. a bogus ICMP redirect were consumed by a security gateway, it could
  2670. cause the forwarding table on the protected side of the boundary to
  2671. be modified so as to deliver traffic to an inappropriate destination
  2672. "behind" the gateway. Thus, implementers MUST provide controls to
  2673. allow local administrators to constrain the processing of ICMP error
  2674. messages received on the protected side of the boundary, and directed
  2675. to the IPsec implementation. These controls are of the same type as
  2676. those employed on the unprotected side, described above in Section
  2677. 6.1.1.
  2678. 6.2. Processing Protected, Transit ICMP Error Messages
  2679. When an ICMP error message is transmitted via an SA to a device
  2680. "behind" an IPsec implementation, both the payload and the header of
  2681. the ICMP message require checking from an access control perspective.
  2682. If one of these messages is forwarded to a host behind a security
  2683. Kent & Seo Standards Track [Page 64]
  2684. RFC 4301 Security Architecture for IP December 2005
  2685. gateway, the receiving host IP implementation will make decisions
  2686. based on the payload, i.e., the header of the packet that purportedly
  2687. triggered the error response. Thus, an IPsec implementation MUST be
  2688. configurable to check that this payload header information is
  2689. consistent with the SA via which it arrives. (This means that the
  2690. payload header, with source and destination address and port fields
  2691. reversed, matches the traffic selectors for the SA.) If this sort of
  2692. check is not performed, then, for example, anyone with whom the
  2693. receiving IPsec system (A) has an active SA could send an ICMP
  2694. Destination Unreachable message that refers to any host/net with
  2695. which A is currently communicating, and thus effect a highly
  2696. efficient DoS attack regarding communication with other peers of A.
  2697. Normal IPsec receiver processing of traffic is not sufficient to
  2698. protect against such attacks. However, not all contexts may require
  2699. such checks, so it is also necessary to allow a local administrator
  2700. to configure an implementation to NOT perform such checks.
  2701. To accommodate both policies, the following convention is adopted.
  2702. If an administrator wants to allow ICMP error messages to be carried
  2703. by an SA without inspection of the payload, then configure an SPD
  2704. entry that explicitly allows for carriage of such traffic. If an
  2705. administrator wants IPsec to check the payload of ICMP error messages
  2706. for consistency, then do not create any SPD entries that accommodate
  2707. carriage of such traffic based on the ICMP packet header. This
  2708. convention motivates the following processing description.
  2709. IPsec senders and receivers MUST support the following processing for
  2710. ICMP error messages that are sent and received via SAs.
  2711. If an SA exists that accommodates an outbound ICMP error message,
  2712. then the message is mapped to the SA and only the IP and ICMP headers
  2713. are checked upon receipt, just as would be the case for other
  2714. traffic. If no SA exists that matches the traffic selectors
  2715. associated with an ICMP error message, then the SPD is searched to
  2716. determine if such an SA can be created. If so, the SA is created and
  2717. the ICMP error message is transmitted via that SA. Upon receipt,
  2718. this message is subject to the usual traffic selector checks at the
  2719. receiver. This processing is exactly what would happen for traffic
  2720. in general, and thus does not represent any special processing for
  2721. ICMP error messages.
  2722. If no SA exists that would carry the outbound ICMP message in
  2723. question, and if no SPD entry would allow carriage of this outbound
  2724. ICMP error message, then an IPsec implementation MUST map the message
  2725. to the SA that would carry the return traffic associated with the
  2726. packet that triggered the ICMP error message. This requires an IPsec
  2727. implementation to detect outbound ICMP error messages that map to no
  2728. extant SA or SPD entry, and treat them specially with regard to SA
  2729. Kent & Seo Standards Track [Page 65]
  2730. RFC 4301 Security Architecture for IP December 2005
  2731. creation and lookup. The implementation extracts the header for the
  2732. packet that triggered the error (from the ICMP message payload),
  2733. reverses the source and destination IP address fields, extracts the
  2734. protocol field, and reverses the port fields (if accessible). It
  2735. then uses this extracted information to locate an appropriate, active
  2736. outbound SA, and transmits the error message via this SA. If no such
  2737. SA exists, no SA will be created, and this is an auditable event.
  2738. If an IPsec implementation receives an inbound ICMP error message on
  2739. an SA, and the IP and ICMP headers of the message do not match the
  2740. traffic selectors for the SA, the receiver MUST process the received
  2741. message in a special fashion. Specifically, the receiver must
  2742. extract the header of the triggering packet from the ICMP payload,
  2743. and reverse fields as described above to determine if the packet is
  2744. consistent with the selectors for the SA via which the ICMP error
  2745. message was received. If the packet fails this check, the IPsec
  2746. implementation MUST NOT forwarded the ICMP message to the
  2747. destination. This is an auditable event.
  2748. 7. Handling Fragments (on the protected side of the IPsec boundary)
  2749. Earlier sections of this document describe mechanisms for (a)
  2750. fragmenting an outbound packet after IPsec processing has been
  2751. applied and reassembling it at the receiver before IPsec processing
  2752. and (b) handling inbound fragments received from the unprotected side
  2753. of the IPsec boundary. This section describes how an implementation
  2754. should handle the processing of outbound plaintext fragments on the
  2755. protected side of the IPsec boundary. (See Appendix D, "Fragment
  2756. Handling Rationale".) In particular, it addresses:
  2757. o mapping an outbound non-initial fragment to the right SA
  2758. (or finding the right SPD entry)
  2759. o verifying that a received non-initial fragment is
  2760. authorized for the SA via which it was received
  2761. o mapping outbound and inbound non-initial fragments to the
  2762. right SPD-O/SPD-I entry or the relevant cache entry, for
  2763. BYPASS/DISCARD traffic
  2764. Note: In Section 4.1, transport mode SAs have been defined to not
  2765. carry fragments (IPv4 or IPv6). Note also that in Section 4.4.1, two
  2766. special values, ANY and OPAQUE, were defined for selectors and that
  2767. ANY includes OPAQUE. The term "non-trivial" is used to mean that the
  2768. selector has a value other than OPAQUE or ANY.
  2769. Note: The term "non-initial fragment" is used here to indicate a
  2770. fragment that does not contain all the selector values that may be
  2771. needed for access control. As observed in Section 4.4.1, depending
  2772. on the Next Layer Protocol, in addition to Ports, the ICMP message
  2773. Kent & Seo Standards Track [Page 66]
  2774. RFC 4301 Security Architecture for IP December 2005
  2775. type/code or Mobility Header type could be missing from non-initial
  2776. fragments. Also, for IPv6, even the first fragment might NOT contain
  2777. the Next Layer Protocol or Ports (or ICMP message type/code, or
  2778. Mobility Header type) depending on the kind and number of extension
  2779. headers present. If a non-initial fragment contains the Port (or
  2780. ICMP type and code or Mobility Header type) but not the Next Layer
  2781. Protocol, then unless there is an SPD entry for the relevant
  2782. Local/Remote addresses with ANY for Next Layer Protocol and Port (or
  2783. ICMP type and code or Mobility Header type), the fragment would not
  2784. contain all the selector information needed for access control.
  2785. To address the above issues, three approaches have been defined:
  2786. o Tunnel mode SAs that carry initial and non-initial fragments
  2787. (See Section 7.1.)
  2788. o Separate tunnel mode SAs for non-initial fragments (See
  2789. Section 7.2.)
  2790. o Stateful fragment checking (See Section 7.3.)
  2791. 7.1. Tunnel Mode SAs that Carry Initial and Non-Initial Fragments
  2792. All implementations MUST support tunnel mode SAs that are configured
  2793. to pass traffic without regard to port field (or ICMP type/code or
  2794. Mobility Header type) values. If the SA will carry traffic for
  2795. specified protocols, the selector set for the SA MUST specify the
  2796. port fields (or ICMP type/code or Mobility Header type) as ANY. An
  2797. SA defined in this fashion will carry all traffic including initial
  2798. and non-initial fragments for the indicated Local/Remote addresses
  2799. and specified Next Layer protocol(s). If the SA will carry traffic
  2800. without regard to a specific protocol value (i.e., ANY is specified
  2801. as the (Next Layer) protocol selector value), then the port field
  2802. values are undefined and MUST be set to ANY as well. (As noted in
  2803. 4.4.1, ANY includes OPAQUE as well as all specific values.)
  2804. 7.2. Separate Tunnel Mode SAs for Non-Initial Fragments
  2805. An implementation MAY support tunnel mode SAs that will carry only
  2806. non-initial fragments, separate from non-fragmented packets and
  2807. initial fragments. The OPAQUE value will be used to specify port (or
  2808. ICMP type/code or Mobility Header type) field selectors for an SA to
  2809. carry such fragments. Receivers MUST perform a minimum offset check
  2810. on IPv4 (non-initial) fragments to protect against overlapping
  2811. fragment attacks when SAs of this type are employed. Because such
  2812. checks cannot be performed on IPv6 non-initial fragments, users and
  2813. administrators are advised that carriage of such fragments may be
  2814. dangerous, and implementers may choose to NOT support such SAs for
  2815. IPv6 traffic. Also, an SA of this sort will carry all non-initial
  2816. fragments that match a specified Local/Remote address pair and
  2817. Kent & Seo Standards Track [Page 67]
  2818. RFC 4301 Security Architecture for IP December 2005
  2819. protocol value, i.e., the fragments carried on this SA belong to
  2820. packets that if not fragmented, might have gone on separate SAs of
  2821. differing security. Therefore, users and administrators are advised
  2822. to protect such traffic using ESP (with integrity) and the
  2823. "strongest" integrity and encryption algorithms in use between both
  2824. peers. (Determination of the "strongest" algorithms requires
  2825. imposing an ordering of the available algorithms, a local
  2826. determination at the discretion of the initiator of the SA.)
  2827. Specific port (or ICMP type/code or Mobility Header type) selector
  2828. values will be used to define SAs to carry initial fragments and
  2829. non-fragmented packets. This approach can be used if a user or
  2830. administrator wants to create one or more tunnel mode SAs between the
  2831. same Local/Remote addresses that discriminate based on port (or ICMP
  2832. type/code or Mobility Header type) fields. These SAs MUST have
  2833. non-trivial protocol selector values, otherwise approach #1 above
  2834. MUST be used.
  2835. Note: In general, for the approach described in this section, one
  2836. needs only a single SA between two implementations to carry all
  2837. non-initial fragments. However, if one chooses to have multiple SAs
  2838. between the two implementations for QoS differentiation, then one
  2839. might also want multiple SAs to carry fragments-without-ports, one
  2840. for each supported QoS class. Since support for QoS via distinct SAs
  2841. is a local matter, not mandated by this document, the choice to have
  2842. multiple SAs to carry non-initial fragments should also be local.
  2843. 7.3. Stateful Fragment Checking
  2844. An implementation MAY support some form of stateful fragment checking
  2845. for a tunnel mode SA with non-trivial port (or ICMP type/code or MH
  2846. type) field values (not ANY or OPAQUE). Implementations that will
  2847. transmit non-initial fragments on a tunnel mode SA that makes use of
  2848. non-trivial port (or ICMP type/code or MH type) selectors MUST notify
  2849. a peer via the IKE NOTIFY NON_FIRST_FRAGMENTS_ALSO payload.
  2850. The peer MUST reject this proposal if it will not accept non-initial
  2851. fragments in this context. If an implementation does not
  2852. successfully negotiate transmission of non-initial fragments for such
  2853. an SA, it MUST NOT send such fragments over the SA. This standard
  2854. does not specify how peers will deal with such fragments, e.g., via
  2855. reassembly or other means, at either sender or receiver. However, a
  2856. receiver MUST discard non-initial fragments that arrive on an SA with
  2857. non-trivial port (or ICMP type/code or MH type) selector values
  2858. unless this feature has been negotiated. Also, the receiver MUST
  2859. discard non-initial fragments that do not comply with the security
  2860. policy applied to the overall packet. Discarding such packets is an
  2861. auditable event. Note that in network configurations where fragments
  2862. Kent & Seo Standards Track [Page 68]
  2863. RFC 4301 Security Architecture for IP December 2005
  2864. of a packet might be sent or received via different security gateways
  2865. or BITW implementations, stateful strategies for tracking fragments
  2866. may fail.
  2867. 7.4. BYPASS/DISCARD Traffic
  2868. All implementations MUST support DISCARDing of fragments using the
  2869. normal SPD packet classification mechanisms. All implementations
  2870. MUST support stateful fragment checking to accommodate BYPASS traffic
  2871. for which a non-trivial port range is specified. The concern is that
  2872. BYPASS of a cleartext, non-initial fragment arriving at an IPsec
  2873. implementation could undermine the security afforded IPsec-protected
  2874. traffic directed to the same destination. For example, consider an
  2875. IPsec implementation configured with an SPD entry that calls for
  2876. IPsec protection of traffic between a specific source/destination
  2877. address pair, and for a specific protocol and destination port, e.g.,
  2878. TCP traffic on port 23 (Telnet). Assume that the implementation also
  2879. allows BYPASS of traffic from the same source/destination address
  2880. pair and protocol, but for a different destination port, e.g., port
  2881. 119 (NNTP). An attacker could send a non-initial fragment (with a
  2882. forged source address) that, if bypassed, could overlap with
  2883. IPsec-protected traffic from the same source and thus violate the
  2884. integrity of the IPsec-protected traffic. Requiring stateful
  2885. fragment checking for BYPASS entries with non-trivial port ranges
  2886. prevents attacks of this sort. As noted above, in network
  2887. configurations where fragments of a packet might be sent or received
  2888. via different security gateways or BITW implementations, stateful
  2889. strategies for tracking fragments may fail.
  2890. 8. Path MTU/DF Processing
  2891. The application of AH or ESP to an outbound packet increases the size
  2892. of a packet and thus may cause a packet to exceed the PMTU for the SA
  2893. via which the packet will travel. An IPsec implementation also may
  2894. receive an unprotected ICMP PMTU message and, if it chooses to act
  2895. upon the message, the result will affect outbound traffic processing.
  2896. This section describes the processing required of an IPsec
  2897. implementation to deal with these two PMTU issues.
  2898. 8.1. DF Bit
  2899. All IPsec implementations MUST support the option of copying the DF
  2900. bit from an outbound packet to the tunnel mode header that it emits,
  2901. when traffic is carried via a tunnel mode SA. This means that it
  2902. MUST be possible to configure the implementation's treatment of the
  2903. DF bit (set, clear, copy from inner header) for each SA. This
  2904. applies to SAs where both inner and outer headers are IPv4.
  2905. Kent & Seo Standards Track [Page 69]
  2906. RFC 4301 Security Architecture for IP December 2005
  2907. 8.2. Path MTU (PMTU) Discovery
  2908. This section discusses IPsec handling for unprotected Path MTU
  2909. Discovery messages. ICMP PMTU is used here to refer to an ICMP
  2910. message for:
  2911. IPv4 (RFC 792 [Pos81b]):
  2912. - Type = 3 (Destination Unreachable)
  2913. - Code = 4 (Fragmentation needed and DF set)
  2914. - Next-Hop MTU in the low-order 16 bits of the
  2915. second word of the ICMP header (labeled "unused"
  2916. in RFC 792), with high-order 16 bits set to zero)
  2917. IPv6 (RFC 2463 [CD98]):
  2918. - Type = 2 (Packet Too Big)
  2919. - Code = 0 (Fragmentation needed)
  2920. - Next-Hop MTU in the 32-bit MTU field of the ICMP6
  2921. message
  2922. 8.2.1. Propagation of PMTU
  2923. When an IPsec implementation receives an unauthenticated PMTU
  2924. message, and it is configured to process (vs. ignore) such messages,
  2925. it maps the message to the SA to which it corresponds. This mapping
  2926. is effected by extracting the header information from the payload of
  2927. the PMTU message and applying the procedure described in Section 5.2.
  2928. The PMTU determined by this message is used to update the SAD PMTU
  2929. field, taking into account the size of the AH or ESP header that will
  2930. be applied, any crypto synchronization data, and the overhead imposed
  2931. by an additional IP header, in the case of a tunnel mode SA.
  2932. In a native host implementation, it is possible to maintain PMTU data
  2933. at the same granularity as for unprotected communication, so there is
  2934. no loss of functionality. Signaling of the PMTU information is
  2935. internal to the host. For all other IPsec implementation options,
  2936. the PMTU data must be propagated via a synthesized ICMP PMTU. In
  2937. these cases, the IPsec implementation SHOULD wait for outbound
  2938. traffic to be mapped to the SAD entry. When such traffic arrives, if
  2939. the traffic would exceed the updated PMTU value the traffic MUST be
  2940. handled as follows:
  2941. Case 1: Original (cleartext) packet is IPv4 and has the DF
  2942. bit set. The implementation SHOULD discard the packet
  2943. and send a PMTU ICMP message.
  2944. Kent & Seo Standards Track [Page 70]
  2945. RFC 4301 Security Architecture for IP December 2005
  2946. Case 2: Original (cleartext) packet is IPv4 and has the DF
  2947. bit clear. The implementation SHOULD fragment (before or
  2948. after encryption per its configuration) and then forward
  2949. the fragments. It SHOULD NOT send a PMTU ICMP message.
  2950. Case 3: Original (cleartext) packet is IPv6. The implementation
  2951. SHOULD discard the packet and send a PMTU ICMP message.
  2952. 8.2.2. PMTU Aging
  2953. In all IPsec implementations, the PMTU associated with an SA MUST be
  2954. "aged" and some mechanism is required to update the PMTU in a timely
  2955. manner, especially for discovering if the PMTU is smaller than
  2956. required by current network conditions. A given PMTU has to remain
  2957. in place long enough for a packet to get from the source of the SA to
  2958. the peer, and to propagate an ICMP error message if the current PMTU
  2959. is too big.
  2960. Implementations SHOULD use the approach described in the Path MTU
  2961. Discovery document (RFC 1191 [MD90], Section 6.3), which suggests
  2962. periodically resetting the PMTU to the first-hop data-link MTU and
  2963. then letting the normal PMTU Discovery processes update the PMTU as
  2964. necessary. The period SHOULD be configurable.
  2965. 9. Auditing
  2966. IPsec implementations are not required to support auditing. For the
  2967. most part, the granularity of auditing is a local matter. However,
  2968. several auditable events are identified in this document, and for
  2969. each of these events a minimum set of information that SHOULD be
  2970. included in an audit log is defined. Additional information also MAY
  2971. be included in the audit log for each of these events, and additional
  2972. events, not explicitly called out in this specification, also MAY
  2973. result in audit log entries. There is no requirement for the
  2974. receiver to transmit any message to the purported transmitter in
  2975. response to the detection of an auditable event, because of the
  2976. potential to induce denial of service via such action.
  2977. 10. Conformance Requirements
  2978. All IPv4 IPsec implementations MUST comply with all requirements of
  2979. this document. All IPv6 implementations MUST comply with all
  2980. requirements of this document.
  2981. Kent & Seo Standards Track [Page 71]
  2982. RFC 4301 Security Architecture for IP December 2005
  2983. 11. Security Considerations
  2984. The focus of this document is security; hence security considerations
  2985. permeate this specification.
  2986. IPsec imposes stringent constraints on bypass of IP header data in
  2987. both directions, across the IPsec barrier, especially when tunnel
  2988. mode SAs are employed. Some constraints are absolute, while others
  2989. are subject to local administrative controls, often on a per-SA
  2990. basis. For outbound traffic, these constraints are designed to limit
  2991. covert channel bandwidth. For inbound traffic, the constraints are
  2992. designed to prevent an adversary who has the ability to tamper with
  2993. one data stream (on the unprotected side of the IPsec barrier) from
  2994. adversely affecting other data streams (on the protected side of the
  2995. barrier). The discussion in Section 5 dealing with processing DSCP
  2996. values for tunnel mode SAs illustrates this concern.
  2997. If an IPsec implementation is configured to pass ICMP error messages
  2998. over SAs based on the ICMP header values, without checking the header
  2999. information from the ICMP message payload, serious vulnerabilities
  3000. may arise. Consider a scenario in which several sites (A, B, and C)
  3001. are connected to one another via ESP-protected tunnels: A-B, A-C, and
  3002. B-C. Also assume that the traffic selectors for each tunnel specify
  3003. ANY for protocol and port fields and IP source/destination address
  3004. ranges that encompass the address range for the systems behind the
  3005. security gateways serving each site. This would allow a host at site
  3006. B to send an ICMP Destination Unreachable message to any host at site
  3007. A, that declares all hosts on the net at site C to be unreachable.
  3008. This is a very efficient DoS attack that could have been prevented if
  3009. the ICMP error messages were subjected to the checks that IPsec
  3010. provides, if the SPD is suitably configured, as described in Section
  3011. 6.2.
  3012. 12. IANA Considerations
  3013. The IANA has assigned the value (3) for the asn1-modules registry and
  3014. has assigned the object identifier 1.3.6.1.5.8.3.1 for the SPD
  3015. module. See Appendix C, "ASN.1 for an SPD Entry".
  3016. 13. Differences from RFC 2401
  3017. This architecture document differs substantially from RFC 2401
  3018. [RFC2401] in detail and in organization, but the fundamental notions
  3019. are unchanged.
  3020. o The processing model has been revised to address new IPsec
  3021. scenarios, improve performance, and simplify implementation. This
  3022. includes a separation between forwarding (routing) and SPD
  3023. Kent & Seo Standards Track [Page 72]
  3024. RFC 4301 Security Architecture for IP December 2005
  3025. selection, several SPD changes, and the addition of an outbound SPD
  3026. cache and an inbound SPD cache for bypassed or discarded traffic.
  3027. There is also a new database, the Peer Authorization Database
  3028. (PAD). This provides a link between an SA management protocol
  3029. (such as IKE) and the SPD.
  3030. o There is no longer a requirement to support nested SAs or "SA
  3031. bundles". Instead this functionality can be achieved through SPD
  3032. and forwarding table configuration. An example of a configuration
  3033. has been added in Appendix E.
  3034. o SPD entries were redefined to provide more flexibility. Each SPD
  3035. entry now consists of 1 to N sets of selectors, where each selector
  3036. set contains one protocol and a "list of ranges" can now be
  3037. specified for the Local IP address, Remote IP address, and whatever
  3038. fields (if any) are associated with the Next Layer Protocol (Local
  3039. Port, Remote Port, ICMP message type and code, and Mobility Header
  3040. type). An individual value for a selector is represented via a
  3041. trivial range and ANY is represented via a range than spans all
  3042. values for the selector. An example of an ASN.1 description is
  3043. included in Appendix C.
  3044. o TOS (IPv4) and Traffic Class (IPv6) have been replaced by DSCP and
  3045. ECN. The tunnel section has been updated to explain how to handle
  3046. DSCP and ECN bits.
  3047. o For tunnel mode SAs, an SG, BITS, or BITW implementation is now
  3048. allowed to fragment packets before applying IPsec. This applies
  3049. only to IPv4. For IPv6 packets, only the originator is allowed to
  3050. fragment them.
  3051. o When security is desired between two intermediate systems along a
  3052. path or between an intermediate system and an end system, transport
  3053. mode may now be used between security gateways and between a
  3054. security gateway and a host.
  3055. o This document clarifies that for all traffic that crosses the IPsec
  3056. boundary, including IPsec management traffic, the SPD or associated
  3057. caches must be consulted.
  3058. o This document defines how to handle the situation of a security
  3059. gateway with multiple subscribers requiring separate IPsec
  3060. contexts.
  3061. o A definition of reserved SPIs has been added.
  3062. Kent & Seo Standards Track [Page 73]
  3063. RFC 4301 Security Architecture for IP December 2005
  3064. o Text has been added explaining why ALL IP packets must be checked
  3065. -- IPsec includes minimal firewall functionality to support access
  3066. control at the IP layer.
  3067. o The tunnel section has been updated to clarify how to handle the IP
  3068. options field and IPv6 extension headers when constructing the
  3069. outer header.
  3070. o SA mapping for inbound traffic has been updated to be consistent
  3071. with the changes made in AH and ESP for support of unicast and
  3072. multicast SAs.
  3073. o Guidance has been added regarding how to handle the covert channel
  3074. created in tunnel mode by copying the DSCP value to outer header.
  3075. o Support for AH in both IPv4 and IPv6 is no longer required.
  3076. o PMTU handling has been updated. The appendix on
  3077. PMTU/DF/Fragmentation has been deleted.
  3078. o Three approaches have been added for handling plaintext fragments
  3079. on the protected side of the IPsec boundary. Appendix D documents
  3080. the rationale behind them.
  3081. o Added revised text describing how to derive selector values for SAs
  3082. (from the SPD entry or from the packet, etc.)
  3083. o Added a new table describing the relationship between selector
  3084. values in an SPD entry, the PFP flag, and resulting selector values
  3085. in the corresponding SAD entry.
  3086. o Added Appendix B to describe decorrelation.
  3087. o Added text describing how to handle an outbound packet that must be
  3088. discarded.
  3089. o Added text describing how to handle a DISCARDED inbound packet,
  3090. i.e., one that does not match the SA upon which it arrived.
  3091. o IPv6 mobility header has been added as a possible Next Layer
  3092. Protocol. IPv6 Mobility Header message type has been added as a
  3093. selector.
  3094. o ICMP message type and code have been added as selectors.
  3095. o The selector "data sensitivity level" has been removed to simplify
  3096. things.
  3097. Kent & Seo Standards Track [Page 74]
  3098. RFC 4301 Security Architecture for IP December 2005
  3099. o Updated text describing handling ICMP error messages. The appendix
  3100. on "Categorization of ICMP Messages" has been deleted.
  3101. o The text for the selector name has been updated and clarified.
  3102. o The "Next Layer Protocol" has been further explained and a default
  3103. list of protocols to skip when looking for the Next Layer Protocol
  3104. has been added.
  3105. o The text has been amended to say that this document assumes use of
  3106. IKEv2 or an SA management protocol with comparable features.
  3107. o Text has been added clarifying the algorithm for mapping inbound
  3108. IPsec datagrams to SAs in the presence of multicast SAs.
  3109. o The appendix "Sequence Space Window Code Example" has been removed.
  3110. o With respect to IP addresses and ports, the terms "Local" and
  3111. "Remote" are used for policy rules (replacing source and
  3112. destination). "Local" refers to the entity being protected by an
  3113. IPsec implementation, i.e., the "source" address/port of outbound
  3114. packets or the "destination" address/port of inbound packets.
  3115. "Remote" refers to a peer entity or peer entities. The terms
  3116. "source" and "destination" are still used for packet header fields.
  3117. 14. Acknowledgements
  3118. The authors would like to acknowledge the contributions of Ran
  3119. Atkinson, who played a critical role in initial IPsec activities, and
  3120. who authored the first series of IPsec standards: RFCs 1825-1827; and
  3121. Charlie Lynn, who made significant contributions to the second series
  3122. of IPsec standards (RFCs 2401, 2402, and 2406) and to the current
  3123. versions, especially with regard to IPv6 issues. The authors also
  3124. would like to thank the members of the IPsec and MSEC working groups
  3125. who have contributed to the development of this protocol
  3126. specification.
  3127. Kent & Seo Standards Track [Page 75]
  3128. RFC 4301 Security Architecture for IP December 2005
  3129. Appendix A: Glossary
  3130. This section provides definitions for several key terms that are
  3131. employed in this document. Other documents provide additional
  3132. definitions and background information relevant to this technology,
  3133. e.g., [Shi00], [VK83], and [HA94]. Included in this glossary are
  3134. generic security service and security mechanism terms, plus
  3135. IPsec-specific terms.
  3136. Access Control
  3137. A security service that prevents unauthorized use of a resource,
  3138. including the prevention of use of a resource in an unauthorized
  3139. manner. In the IPsec context, the resource to which access is
  3140. being controlled is often:
  3141. o for a host, computing cycles or data
  3142. o for a security gateway, a network behind the gateway
  3143. or bandwidth on that network.
  3144. Anti-replay
  3145. See "Integrity" below.
  3146. Authentication
  3147. Used informally to refer to the combination of two nominally
  3148. distinct security services, data origin authentication and
  3149. connectionless integrity. See the definitions below for each of
  3150. these services.
  3151. Availability
  3152. When viewed as a security service, addresses the security concerns
  3153. engendered by attacks against networks that deny or degrade
  3154. service. For example, in the IPsec context, the use of
  3155. anti-replay mechanisms in AH and ESP support availability.
  3156. Confidentiality
  3157. The security service that protects data from unauthorized
  3158. disclosure. The primary confidentiality concern in most instances
  3159. is unauthorized disclosure of application-level data, but
  3160. disclosure of the external characteristics of communication also
  3161. can be a concern in some circumstances. Traffic flow
  3162. confidentiality is the service that addresses this latter concern
  3163. by concealing source and destination addresses, message length, or
  3164. frequency of communication. In the IPsec context, using ESP in
  3165. tunnel mode, especially at a security gateway, can provide some
  3166. level of traffic flow confidentiality. (See also "Traffic
  3167. Analysis" below.)
  3168. Kent & Seo Standards Track [Page 76]
  3169. RFC 4301 Security Architecture for IP December 2005
  3170. Data Origin Authentication
  3171. A security service that verifies the identity of the claimed
  3172. source of data. This service is usually bundled with
  3173. connectionless integrity service.
  3174. Encryption
  3175. A security mechanism used to transform data from an intelligible
  3176. form (plaintext) into an unintelligible form (ciphertext), to
  3177. provide confidentiality. The inverse transformation process is
  3178. designated "decryption". Often the term "encryption" is used to
  3179. generically refer to both processes.
  3180. Integrity
  3181. A security service that ensures that modifications to data are
  3182. detectable. Integrity comes in various flavors to match
  3183. application requirements. IPsec supports two forms of integrity:
  3184. connectionless and a form of partial sequence integrity.
  3185. Connectionless integrity is a service that detects modification of
  3186. an individual IP datagram, without regard to the ordering of the
  3187. datagram in a stream of traffic. The form of partial sequence
  3188. integrity offered in IPsec is referred to as anti-replay
  3189. integrity, and it detects arrival of duplicate IP datagrams
  3190. (within a constrained window). This is in contrast to
  3191. connection-oriented integrity, which imposes more stringent
  3192. sequencing requirements on traffic, e.g., to be able to detect
  3193. lost or re-ordered messages. Although authentication and
  3194. integrity services often are cited separately, in practice they
  3195. are intimately connected and almost always offered in tandem.
  3196. Protected vs. Unprotected
  3197. "Protected" refers to the systems or interfaces that are inside
  3198. the IPsec protection boundary, and "unprotected" refers to the
  3199. systems or interfaces that are outside the IPsec protection
  3200. boundary. IPsec provides a boundary through which traffic passes.
  3201. There is an asymmetry to this barrier, which is reflected in the
  3202. processing model. Outbound data, if not discarded or bypassed, is
  3203. protected via the application of AH or ESP and the addition of the
  3204. corresponding headers. Inbound data, if not discarded or
  3205. bypassed, is processed via the removal of AH or ESP headers. In
  3206. this document, inbound traffic enters an IPsec implementation from
  3207. the "unprotected" interface. Outbound traffic enters the
  3208. implementation via the "protected" interface, or is internally
  3209. generated by the implementation on the "protected" side of the
  3210. boundary and directed toward the "unprotected" interface. An
  3211. IPsec implementation may support more than one interface on either
  3212. or both sides of the boundary. The protected interface may be
  3213. Kent & Seo Standards Track [Page 77]
  3214. RFC 4301 Security Architecture for IP December 2005
  3215. internal, e.g., in a host implementation of IPsec. The protected
  3216. interface may link to a socket layer interface presented by the
  3217. OS.
  3218. Security Association (SA)
  3219. A simplex (uni-directional) logical connection, created for
  3220. security purposes. All traffic traversing an SA is provided the
  3221. same security processing. In IPsec, an SA is an Internet-layer
  3222. abstraction implemented through the use of AH or ESP. State data
  3223. associated with an SA is represented in the SA Database (SAD).
  3224. Security Gateway
  3225. An intermediate system that acts as the communications interface
  3226. between two networks. The set of hosts (and networks) on the
  3227. external side of the security gateway is termed unprotected (they
  3228. are generally at least less protected than those "behind" the SG),
  3229. while the networks and hosts on the internal side are viewed as
  3230. protected. The internal subnets and hosts served by a security
  3231. gateway are presumed to be trusted by virtue of sharing a common,
  3232. local, security administration. In the IPsec context, a security
  3233. gateway is a point at which AH and/or ESP is implemented in order
  3234. to serve a set of internal hosts, providing security services for
  3235. these hosts when they communicate with external hosts also
  3236. employing IPsec (either directly or via another security gateway).
  3237. Security Parameters Index (SPI)
  3238. An arbitrary 32-bit value that is used by a receiver to identify
  3239. the SA to which an incoming packet should be bound. For a unicast
  3240. SA, the SPI can be used by itself to specify an SA, or it may be
  3241. used in conjunction with the IPsec protocol type. Additional IP
  3242. address information is used to identify multicast SAs. The SPI is
  3243. carried in AH and ESP protocols to enable the receiving system to
  3244. select the SA under which a received packet will be processed. An
  3245. SPI has only local significance, as defined by the creator of the
  3246. SA (usually the receiver of the packet carrying the SPI); thus an
  3247. SPI is generally viewed as an opaque bit string. However, the
  3248. creator of an SA may choose to interpret the bits in an SPI to
  3249. facilitate local processing.
  3250. Traffic Analysis
  3251. The analysis of network traffic flow for the purpose of deducing
  3252. information that is useful to an adversary. Examples of such
  3253. information are frequency of transmission, the identities of the
  3254. conversing parties, sizes of packets, and flow identifiers
  3255. [Sch94].
  3256. Kent & Seo Standards Track [Page 78]
  3257. RFC 4301 Security Architecture for IP December 2005
  3258. Appendix B: Decorrelation
  3259. This appendix is based on work done for caching of policies in the IP
  3260. Security Policy Working Group by Luis Sanchez, Matt Condell, and John
  3261. Zao.
  3262. Two SPD entries are correlated if there is a non-null intersection
  3263. between the values of corresponding selectors in each entry. Caching
  3264. correlated SPD entries can lead to incorrect policy enforcement. A
  3265. solution to this problem, which still allows for caching, is to
  3266. remove the ambiguities by decorrelating the entries. That is, the
  3267. SPD entries must be rewritten so that for every pair of entries there
  3268. exists a selector for which there is a null intersection between the
  3269. values in both of the entries. Once the entries are decorrelated,
  3270. there is no longer any ordering requirement on them, since only one
  3271. entry will match any lookup. The next section describes
  3272. decorrelation in more detail and presents an algorithm that may be
  3273. used to implement decorrelation.
  3274. B.1. Decorrelation Algorithm
  3275. The basic decorrelation algorithm takes each entry in a correlated
  3276. SPD and divides it into a set of entries using a tree structure.
  3277. The nodes of the tree are the selectors that may overlap between the
  3278. policies. At each node, the algorithm creates a branch for each of
  3279. the values of the selector. It also creates one branch for the
  3280. complement of the union of all selector values. Policies are then
  3281. formed by traversing the tree from the root to each leaf. The
  3282. policies at the leaves are compared to the set of already
  3283. decorrelated policy rules. Each policy at a leaf is either
  3284. completely overridden by a policy in the already decorrelated set and
  3285. is discarded or is decorrelated with all the policies in the
  3286. decorrelated set and is added to it.
  3287. The basic algorithm does not guarantee an optimal set of decorrelated
  3288. entries. That is, the entries may be broken up into smaller sets
  3289. than is necessary, though they will still provide all the necessary
  3290. policy information. Some extensions to the basic algorithm are
  3291. described later to improve this and improve the performance of the
  3292. algorithm.
  3293. C A set of ordered, correlated entries (a correlated SPD).
  3294. Ci The ith entry in C.
  3295. U The set of decorrelated entries being built from C.
  3296. Ui The ith entry in U.
  3297. Sik The kth selection for policy Ci.
  3298. Ai The action for policy Ci.
  3299. Kent & Seo Standards Track [Page 79]
  3300. RFC 4301 Security Architecture for IP December 2005
  3301. A policy (SPD entry) P may be expressed as a sequence of selector
  3302. values and an action (BYPASS, DISCARD, or PROTECT):
  3303. Ci = Si1 x Si2 x ... x Sik -> Ai
  3304. 1) Put C1 in set U as U1
  3305. For each policy Cj (j > 1) in C
  3306. 2) If Cj is decorrelated with every entry in U, then add it to U.
  3307. 3) If Cj is correlated with one or more entries in U, create a tree
  3308. rooted at the policy Cj that partitions Cj into a set of decorrelated
  3309. entries. The algorithm starts with a root node where no selectors
  3310. have yet been chosen.
  3311. A) Choose a selector in Cj, Sjn, that has not yet been chosen when
  3312. traversing the tree from the root to this node. If there are no
  3313. selectors not yet used, continue to the next unfinished branch
  3314. until all branches have been completed. When the tree is
  3315. completed, go to step D.
  3316. T is the set of entries in U that are correlated with the entry
  3317. at this node.
  3318. The entry at this node is the entry formed by the selector
  3319. values of each of the branches between the root and this node.
  3320. Any selector values that are not yet represented by branches
  3321. assume the corresponding selector value in Cj, since the values
  3322. in Cj represent the maximum value for each selector.
  3323. B) Add a branch to the tree for each value of the selector Sjn that
  3324. appears in any of the entries in T. (If the value is a superset
  3325. of the value of Sjn in Cj, then use the value in Cj, since that
  3326. value represents the universal set.) Also add a branch for the
  3327. complement of the union of all the values of the selector Sjn
  3328. in T. When taking the complement, remember that the universal
  3329. set is the value of Sjn in Cj. A branch need not be created
  3330. for the null set.
  3331. C) Repeat A and B until the tree is completed.
  3332. D) The entry to each leaf now represents an entry that is a subset
  3333. of Cj. The entries at the leaves completely partition Cj in
  3334. such a way that each entry is either completely overridden by
  3335. an entry in U, or is decorrelated with the entries in U.
  3336. Add all the decorrelated entries at the leaves of the tree to U.
  3337. Kent & Seo Standards Track [Page 80]
  3338. RFC 4301 Security Architecture for IP December 2005
  3339. 4) Get next Cj and go to 2.
  3340. 5) When all entries in C have been processed, then U will contain an
  3341. decorrelated version of C.
  3342. There are several optimizations that can be made to this algorithm.
  3343. A few of them are presented here.
  3344. It is possible to optimize, or at least improve, the amount of
  3345. branching that occurs by carefully choosing the order of the
  3346. selectors used for the next branch. For example, if a selector Sjn
  3347. can be chosen so that all the values for that selector in T are equal
  3348. to or a superset of the value of Sjn in Cj, then only a single branch
  3349. needs to be created (since the complement will be null).
  3350. Branches of the tree do not have to proceed with the entire
  3351. decorrelation algorithm. For example, if a node represents an entry
  3352. that is decorrelated with all the entries in U, then there is no
  3353. reason to continue decorrelating that branch. Also, if a branch is
  3354. completely overridden by an entry in U, then there is no reason to
  3355. continue decorrelating the branch.
  3356. An additional optimization is to check to see if a branch is
  3357. overridden by one of the CORRELATED entries in set C that has already
  3358. been decorrelated. That is, if the branch is part of decorrelating
  3359. Cj, then check to see if it was overridden by an entry Cm, m < j.
  3360. This is a valid check, since all the entries Cm are already expressed
  3361. in U.
  3362. Along with checking if an entry is already decorrelated in step 2,
  3363. check if Cj is overridden by any entry in U. If it is, skip it since
  3364. it is not relevant. An entry x is overridden by another entry y if
  3365. every selector in x is equal to or a subset of the corresponding
  3366. selector in entry y.
  3367. Kent & Seo Standards Track [Page 81]
  3368. RFC 4301 Security Architecture for IP December 2005
  3369. Appendix C: ASN.1 for an SPD Entry
  3370. This appendix is included as an additional way to describe SPD
  3371. entries, as defined in Section 4.4.1. It uses ASN.1 syntax that has
  3372. been successfully compiled. This syntax is merely illustrative and
  3373. need not be employed in an implementation to achieve compliance. The
  3374. SPD description in Section 4.4.1 is normative.
  3375. SPDModule
  3376. {iso(1) org (3) dod (6) internet (1) security (5) mechanisms (5)
  3377. ipsec (8) asn1-modules (3) spd-module (1) }
  3378. DEFINITIONS IMPLICIT TAGS ::=
  3379. BEGIN
  3380. IMPORTS
  3381. RDNSequence FROM PKIX1Explicit88
  3382. { iso(1) identified-organization(3)
  3383. dod(6) internet(1) security(5) mechanisms(5) pkix(7)
  3384. id-mod(0) id-pkix1-explicit(18) } ;
  3385. -- An SPD is a list of policies in decreasing order of preference
  3386. SPD ::= SEQUENCE OF SPDEntry
  3387. SPDEntry ::= CHOICE {
  3388. iPsecEntry IPsecEntry, -- PROTECT traffic
  3389. bypassOrDiscard [0] BypassOrDiscardEntry } -- DISCARD/BYPASS
  3390. IPsecEntry ::= SEQUENCE { -- Each entry consists of
  3391. name NameSets OPTIONAL,
  3392. pFPs PacketFlags, -- Populate from packet flags
  3393. -- Applies to ALL of the corresponding
  3394. -- traffic selectors in the SelectorLists
  3395. condition SelectorLists, -- Policy "condition"
  3396. processing Processing -- Policy "action"
  3397. }
  3398. BypassOrDiscardEntry ::= SEQUENCE {
  3399. bypass BOOLEAN, -- TRUE BYPASS, FALSE DISCARD
  3400. condition InOutBound }
  3401. InOutBound ::= CHOICE {
  3402. outbound [0] SelectorLists,
  3403. inbound [1] SelectorLists,
  3404. bothways [2] BothWays }
  3405. Kent & Seo Standards Track [Page 82]
  3406. RFC 4301 Security Architecture for IP December 2005
  3407. BothWays ::= SEQUENCE {
  3408. inbound SelectorLists,
  3409. outbound SelectorLists }
  3410. NameSets ::= SEQUENCE {
  3411. passed SET OF Names-R, -- Matched to IKE ID by
  3412. -- responder
  3413. local SET OF Names-I } -- Used internally by IKE
  3414. -- initiator
  3415. Names-R ::= CHOICE { -- IKEv2 IDs
  3416. dName RDNSequence, -- ID_DER_ASN1_DN
  3417. fqdn FQDN, -- ID_FQDN
  3418. rfc822 [0] RFC822Name, -- ID_RFC822_ADDR
  3419. keyID OCTET STRING } -- KEY_ID
  3420. Names-I ::= OCTET STRING -- Used internally by IKE
  3421. -- initiator
  3422. FQDN ::= IA5String
  3423. RFC822Name ::= IA5String
  3424. PacketFlags ::= BIT STRING {
  3425. -- if set, take selector value from packet
  3426. -- establishing SA
  3427. -- else use value in SPD entry
  3428. localAddr (0),
  3429. remoteAddr (1),
  3430. protocol (2),
  3431. localPort (3),
  3432. remotePort (4) }
  3433. SelectorLists ::= SET OF SelectorList
  3434. SelectorList ::= SEQUENCE {
  3435. localAddr AddrList,
  3436. remoteAddr AddrList,
  3437. protocol ProtocolChoice }
  3438. Processing ::= SEQUENCE {
  3439. extSeqNum BOOLEAN, -- TRUE 64 bit counter, FALSE 32 bit
  3440. seqOverflow BOOLEAN, -- TRUE rekey, FALSE terminate & audit
  3441. fragCheck BOOLEAN, -- TRUE stateful fragment checking,
  3442. -- FALSE no stateful fragment checking
  3443. lifetime SALifetime,
  3444. spi ManualSPI,
  3445. algorithms ProcessingAlgs,
  3446. Kent & Seo Standards Track [Page 83]
  3447. RFC 4301 Security Architecture for IP December 2005
  3448. tunnel TunnelOptions OPTIONAL } -- if absent, use
  3449. -- transport mode
  3450. SALifetime ::= SEQUENCE {
  3451. seconds [0] INTEGER OPTIONAL,
  3452. bytes [1] INTEGER OPTIONAL }
  3453. ManualSPI ::= SEQUENCE {
  3454. spi INTEGER,
  3455. keys KeyIDs }
  3456. KeyIDs ::= SEQUENCE OF OCTET STRING
  3457. ProcessingAlgs ::= CHOICE {
  3458. ah [0] IntegrityAlgs, -- AH
  3459. esp [1] ESPAlgs} -- ESP
  3460. ESPAlgs ::= CHOICE {
  3461. integrity [0] IntegrityAlgs, -- integrity only
  3462. confidentiality [1] ConfidentialityAlgs, -- confidentiality
  3463. -- only
  3464. both [2] IntegrityConfidentialityAlgs,
  3465. combined [3] CombinedModeAlgs }
  3466. IntegrityConfidentialityAlgs ::= SEQUENCE {
  3467. integrity IntegrityAlgs,
  3468. confidentiality ConfidentialityAlgs }
  3469. -- Integrity Algorithms, ordered by decreasing preference
  3470. IntegrityAlgs ::= SEQUENCE OF IntegrityAlg
  3471. -- Confidentiality Algorithms, ordered by decreasing preference
  3472. ConfidentialityAlgs ::= SEQUENCE OF ConfidentialityAlg
  3473. -- Integrity Algorithms
  3474. IntegrityAlg ::= SEQUENCE {
  3475. algorithm IntegrityAlgType,
  3476. parameters ANY -- DEFINED BY algorithm -- OPTIONAL }
  3477. IntegrityAlgType ::= INTEGER {
  3478. none (0),
  3479. auth-HMAC-MD5-96 (1),
  3480. auth-HMAC-SHA1-96 (2),
  3481. auth-DES-MAC (3),
  3482. auth-KPDK-MD5 (4),
  3483. auth-AES-XCBC-96 (5)
  3484. -- tbd (6..65535)
  3485. }
  3486. Kent & Seo Standards Track [Page 84]
  3487. RFC 4301 Security Architecture for IP December 2005
  3488. -- Confidentiality Algorithms
  3489. ConfidentialityAlg ::= SEQUENCE {
  3490. algorithm ConfidentialityAlgType,
  3491. parameters ANY -- DEFINED BY algorithm -- OPTIONAL }
  3492. ConfidentialityAlgType ::= INTEGER {
  3493. encr-DES-IV64 (1),
  3494. encr-DES (2),
  3495. encr-3DES (3),
  3496. encr-RC5 (4),
  3497. encr-IDEA (5),
  3498. encr-CAST (6),
  3499. encr-BLOWFISH (7),
  3500. encr-3IDEA (8),
  3501. encr-DES-IV32 (9),
  3502. encr-RC4 (10),
  3503. encr-NULL (11),
  3504. encr-AES-CBC (12),
  3505. encr-AES-CTR (13)
  3506. -- tbd (14..65535)
  3507. }
  3508. CombinedModeAlgs ::= SEQUENCE OF CombinedModeAlg
  3509. CombinedModeAlg ::= SEQUENCE {
  3510. algorithm CombinedModeType,
  3511. parameters ANY -- DEFINED BY algorithm} -- defined outside
  3512. -- of this document for AES modes.
  3513. CombinedModeType ::= INTEGER {
  3514. comb-AES-CCM (1),
  3515. comb-AES-GCM (2)
  3516. -- tbd (3..65535)
  3517. }
  3518. TunnelOptions ::= SEQUENCE {
  3519. dscp DSCP,
  3520. ecn BOOLEAN, -- TRUE Copy CE to inner header
  3521. df DF,
  3522. addresses TunnelAddresses }
  3523. TunnelAddresses ::= CHOICE {
  3524. ipv4 IPv4Pair,
  3525. ipv6 [0] IPv6Pair }
  3526. IPv4Pair ::= SEQUENCE {
  3527. local OCTET STRING (SIZE(4)),
  3528. remote OCTET STRING (SIZE(4)) }
  3529. Kent & Seo Standards Track [Page 85]
  3530. RFC 4301 Security Architecture for IP December 2005
  3531. IPv6Pair ::= SEQUENCE {
  3532. local OCTET STRING (SIZE(16)),
  3533. remote OCTET STRING (SIZE(16)) }
  3534. DSCP ::= SEQUENCE {
  3535. copy BOOLEAN, -- TRUE copy from inner header
  3536. -- FALSE do not copy
  3537. mapping OCTET STRING OPTIONAL} -- points to table
  3538. -- if no copy
  3539. DF ::= INTEGER {
  3540. clear (0),
  3541. set (1),
  3542. copy (2) }
  3543. ProtocolChoice::= CHOICE {
  3544. anyProt AnyProtocol, -- for ANY protocol
  3545. noNext [0] NoNextLayerProtocol, -- has no next layer
  3546. -- items
  3547. oneNext [1] OneNextLayerProtocol, -- has one next layer
  3548. -- item
  3549. twoNext [2] TwoNextLayerProtocol, -- has two next layer
  3550. -- items
  3551. fragment FragmentNoNext } -- has no next layer
  3552. -- info
  3553. AnyProtocol ::= SEQUENCE {
  3554. id INTEGER (0), -- ANY protocol
  3555. nextLayer AnyNextLayers }
  3556. AnyNextLayers ::= SEQUENCE { -- with either
  3557. first AnyNextLayer, -- ANY next layer selector
  3558. second AnyNextLayer } -- ANY next layer selector
  3559. NoNextLayerProtocol ::= INTEGER (2..254)
  3560. FragmentNoNext ::= INTEGER (44) -- Fragment identifier
  3561. OneNextLayerProtocol ::= SEQUENCE {
  3562. id INTEGER (1..254), -- ICMP, MH, ICMPv6
  3563. nextLayer NextLayerChoice } -- ICMP Type*256+Code
  3564. -- MH Type*256
  3565. TwoNextLayerProtocol ::= SEQUENCE {
  3566. id INTEGER (2..254), -- Protocol
  3567. local NextLayerChoice, -- Local and
  3568. remote NextLayerChoice } -- Remote ports
  3569. Kent & Seo Standards Track [Page 86]
  3570. RFC 4301 Security Architecture for IP December 2005
  3571. NextLayerChoice ::= CHOICE {
  3572. any AnyNextLayer,
  3573. opaque [0] OpaqueNextLayer,
  3574. range [1] NextLayerRange }
  3575. -- Representation of ANY in next layer field
  3576. AnyNextLayer ::= SEQUENCE {
  3577. start INTEGER (0),
  3578. end INTEGER (65535) }
  3579. -- Representation of OPAQUE in next layer field.
  3580. -- Matches IKE convention
  3581. OpaqueNextLayer ::= SEQUENCE {
  3582. start INTEGER (65535),
  3583. end INTEGER (0) }
  3584. -- Range for a next layer field
  3585. NextLayerRange ::= SEQUENCE {
  3586. start INTEGER (0..65535),
  3587. end INTEGER (0..65535) }
  3588. -- List of IP addresses
  3589. AddrList ::= SEQUENCE {
  3590. v4List IPv4List OPTIONAL,
  3591. v6List [0] IPv6List OPTIONAL }
  3592. -- IPv4 address representations
  3593. IPv4List ::= SEQUENCE OF IPv4Range
  3594. IPv4Range ::= SEQUENCE { -- close, but not quite right ...
  3595. ipv4Start OCTET STRING (SIZE (4)),
  3596. ipv4End OCTET STRING (SIZE (4)) }
  3597. -- IPv6 address representations
  3598. IPv6List ::= SEQUENCE OF IPv6Range
  3599. IPv6Range ::= SEQUENCE { -- close, but not quite right ...
  3600. ipv6Start OCTET STRING (SIZE (16)),
  3601. ipv6End OCTET STRING (SIZE (16)) }
  3602. END
  3603. Kent & Seo Standards Track [Page 87]
  3604. RFC 4301 Security Architecture for IP December 2005
  3605. Appendix D: Fragment Handling Rationale
  3606. There are three issues that must be resolved regarding processing of
  3607. (plaintext) fragments in IPsec:
  3608. - mapping a non-initial, outbound fragment to the right SA
  3609. (or finding the right SPD entry)
  3610. - verifying that a received, non-initial fragment is authorized
  3611. for the SA via which it is received
  3612. - mapping outbound and inbound non-initial fragments to the
  3613. right SPD/cache entry, for BYPASS/DISCARD traffic
  3614. The first and third issues arise because we need a deterministic
  3615. algorithm for mapping traffic to SAs (and SPD/cache entries). All
  3616. three issues are important because we want to make sure that
  3617. non-initial fragments that cross the IPsec boundary do not cause the
  3618. access control policies in place at the receiver (or transmitter) to
  3619. be violated.
  3620. D.1. Transport Mode and Fragments
  3621. First, we note that transport mode SAs have been defined to not carry
  3622. fragments. This is a carryover from RFC 2401, where transport mode
  3623. SAs always terminated at endpoints. This is a fundamental
  3624. requirement because, in the worst case, an IPv4 fragment to which
  3625. IPsec was applied might then be fragmented (as a ciphertext packet),
  3626. en route to the destination. IP fragment reassembly procedures at
  3627. the IPsec receiver would not be able to distinguish between pre-IPsec
  3628. fragments and fragments created after IPsec processing.
  3629. For IPv6, only the sender is allowed to fragment a packet. As for
  3630. IPv4, an IPsec implementation is allowed to fragment tunnel mode
  3631. packets after IPsec processing, because it is the sender relative to
  3632. the (outer) tunnel header. However, unlike IPv4, it would be
  3633. feasible to carry a plaintext fragment on a transport mode SA,
  3634. because the fragment header in IPv6 would appear after the AH or ESP
  3635. header, and thus would not cause confusion at the receiver with
  3636. respect to reassembly. Specifically, the receiver would not attempt
  3637. reassembly for the fragment until after IPsec processing. To keep
  3638. things simple, this specification prohibits carriage of fragments on
  3639. transport mode SAs for IPv6 traffic.
  3640. When only end systems used transport mode SAs, the prohibition on
  3641. carriage of fragments was not a problem, since we assumed that the
  3642. end system could be configured to not offer a fragment to IPsec. For
  3643. a native host implementation, this seems reasonable, and, as someone
  3644. already noted, RFC 2401 warned that a BITS implementation might have
  3645. to reassemble fragments before performing an SA lookup. (It would
  3646. Kent & Seo Standards Track [Page 88]
  3647. RFC 4301 Security Architecture for IP December 2005
  3648. then apply AH or ESP and could re-fragment the packet after IPsec
  3649. processing.) Because a BITS implementation is assumed to be able to
  3650. have access to all traffic emanating from its host, even if the host
  3651. has multiple interfaces, this was deemed a reasonable mandate.
  3652. In this specification, it is acceptable to use transport mode in
  3653. cases where the IPsec implementation is not the ultimate destination,
  3654. e.g., between two SGs. In principle, this creates a new opportunity
  3655. for outbound, plaintext fragments to be mapped to a transport mode SA
  3656. for IPsec processing. However, in these new contexts in which a
  3657. transport mode SA is now approved for use, it seems likely that we
  3658. can continue to prohibit transmission of fragments, as seen by IPsec,
  3659. i.e., packets that have an "outer header" with a non-zero fragment
  3660. offset field. For example, in an IP overlay network, packets being
  3661. sent over transport mode SAs are IP-in-IP tunneled and thus have the
  3662. necessary inner header to accommodate fragmentation prior to IPsec
  3663. processing. When carried via a transport mode SA, IPsec would not
  3664. examine the inner IP header for such traffic, and thus would not
  3665. consider the packet to be a fragment.
  3666. D.2. Tunnel Mode and Fragments
  3667. For tunnel mode SAs, it has always been the case that outbound
  3668. fragments might arrive for processing at an IPsec implementation.
  3669. The need to accommodate fragmented outbound packets can pose a
  3670. problem because a non-initial fragment generally will not contain the
  3671. port fields associated with a next layer protocol such as TCP, UDP,
  3672. or SCTP. Thus, depending on the SPD configuration for a given IPsec
  3673. implementation, plaintext fragments might or might not pose a
  3674. problem.
  3675. For example, if the SPD requires that all traffic between two address
  3676. ranges is offered IPsec protection (no BYPASS or DISCARD SPD entries
  3677. apply to this address range), then it should be easy to carry
  3678. non-initial fragments on the SA defined for this address range, since
  3679. the SPD entry implies an intent to carry ALL traffic between the
  3680. address ranges. But, if there are multiple SPD entries that could
  3681. match a fragment, and if these entries reference different subsets of
  3682. port fields (vs. ANY), then it is not possible to map an outbound
  3683. non-initial fragment to the right entry, unambiguously. (If we choose
  3684. to allow carriage of fragments on transport mode SAs for IPv6, the
  3685. problems arises in that context as well.)
  3686. This problem largely, though not exclusively, motivated the
  3687. definition of OPAQUE as a selector value for port fields in RFC 2401.
  3688. The other motivation for OPAQUE is the observation that port fields
  3689. might not be accessible due to the prior application of IPsec. For
  3690. example, if a host applied IPsec to its traffic and that traffic
  3691. Kent & Seo Standards Track [Page 89]
  3692. RFC 4301 Security Architecture for IP December 2005
  3693. arrived at an SG, these fields would be encrypted. The algorithm
  3694. specified for locating the "next layer protocol" described in RFC
  3695. 2401 also motivated use of OPAQUE to accommodate an encrypted next
  3696. layer protocol field in such circumstances. Nonetheless, the primary
  3697. use of the OPAQUE value was to match traffic selector fields in
  3698. packets that did not contain port fields (non-initial fragments), or
  3699. packets in which the port fields were already encrypted (as a result
  3700. of nested application of IPsec). RFC 2401 was ambiguous in
  3701. discussing the use of OPAQUE vs. ANY, suggesting in some places that
  3702. ANY might be an alternative to OPAQUE.
  3703. We gain additional access control capability by defining both ANY and
  3704. OPAQUE values. OPAQUE can be defined to match only fields that are
  3705. not accessible. We could define ANY as the complement of OPAQUE,
  3706. i.e., it would match all values but only for accessible port fields.
  3707. We have therefore simplified the procedure employed to locate the
  3708. next layer protocol in this document, so that we treat ESP and AH as
  3709. next layer protocols. As a result, the notion of an encrypted next
  3710. layer protocol field has vanished, and there is also no need to worry
  3711. about encrypted port fields either. And accordingly, OPAQUE will be
  3712. applicable only to non-initial fragments.
  3713. Since we have adopted the definitions above for ANY and OPAQUE, we
  3714. need to clarify how these values work when the specified protocol
  3715. does not have port fields, and when ANY is used for the protocol
  3716. selector. Accordingly, if a specific protocol value is used as a
  3717. selector, and if that protocol has no port fields, then the port
  3718. field selectors are to be ignored and ANY MUST be specified as the
  3719. value for the port fields. (In this context, ICMP TYPE and CODE
  3720. values are lumped together as a single port field (for IKEv2
  3721. negotiation), as is the IPv6 Mobility Header TYPE value.) If the
  3722. protocol selector is ANY, then this should be treated as equivalent
  3723. to specifying a protocol for which no port fields are defined, and
  3724. thus the port selectors should be ignored, and MUST be set to ANY.
  3725. D.3. The Problem of Non-Initial Fragments
  3726. For an SG implementation, it is obvious that fragments might arrive
  3727. from end systems behind the SG. A BITW implementation also may
  3728. encounter fragments from a host or gateway behind it. (As noted
  3729. earlier, native host implementations and BITS implementations
  3730. probably can avoid the problems described below.) In the worst case,
  3731. fragments from a packet might arrive at distinct BITW or SG
  3732. instantiations and thus preclude reassembly as a solution option.
  3733. Hence, in RFC 2401 we adopted a general requirement that fragments
  3734. must be accommodated in tunnel mode for all implementations. However,
  3735. Kent & Seo Standards Track [Page 90]
  3736. RFC 4301 Security Architecture for IP December 2005
  3737. RFC 2401 did not provide a perfect solution. The use of OPAQUE as a
  3738. selector value for port fields (a SHOULD in RFC 2401) allowed an SA
  3739. to carry non-initial fragments.
  3740. Using the features defined in RFC 2401, if one defined an SA between
  3741. two IPsec (SG or BITW) implementations using the OPAQUE value for
  3742. both port fields, then all non-initial fragments matching the
  3743. source/destination (S/D) address and protocol values for the SA would
  3744. be mapped to that SA. Initial fragments would NOT map to this SA, if
  3745. we adopt a strict definition of OPAQUE. However, RFC 2401 did not
  3746. provide detailed guidance on this and thus it may not have been
  3747. apparent that use of this feature would essentially create a
  3748. "non-initial fragment only" SA.
  3749. In the course of discussing the "fragment-only" SA approach, it was
  3750. noted that some subtle problems, problems not considered in RFC 2401,
  3751. would have to be avoided. For example, an SA of this sort must be
  3752. configured to offer the "highest quality" security services for any
  3753. traffic between the indicated S/D addresses (for the specified
  3754. protocol). This is necessary to ensure that any traffic captured by
  3755. the fragment-only SA is not offered degraded security relative to
  3756. what it would have been offered if the packet were not fragmented. A
  3757. possible problem here is that we may not be able to identify the
  3758. "highest quality" security services defined for use between two IPsec
  3759. implementation, since the choice of security protocols, options, and
  3760. algorithms is a lattice, not a totally ordered set. (We might safely
  3761. say that BYPASS < AH < ESP w/integrity, but it gets complicated if we
  3762. have multiple ESP encryption or integrity algorithm options.) So, one
  3763. has to impose a total ordering on these security parameters to make
  3764. this work, but this can be done locally.
  3765. However, this conservative strategy has a possible performance
  3766. downside. If most traffic traversing an IPsec implementation for a
  3767. given S/D address pair (and specified protocol) is bypassed, then a
  3768. fragment-only SA for that address pair might cause a dramatic
  3769. increase in the volume of traffic afforded crypto processing. If the
  3770. crypto implementation cannot support high traffic rates, this could
  3771. cause problems. (An IPsec implementation that is capable of line rate
  3772. or near line rate crypto performance would not be adversely affected
  3773. by this SA configuration approach. Nonetheless, the performance
  3774. impact is a potential concern, specific to implementation
  3775. capabilities.)
  3776. Another concern is that non-initial fragments sent over a dedicated
  3777. SA might be used to effect overlapping reassembly attacks, when
  3778. combined with an apparently acceptable initial fragment. (This sort
  3779. of attack assumes creation of bogus fragments and is not a side
  3780. effect of normal fragmentation.) This concern is easily addressed in
  3781. Kent & Seo Standards Track [Page 91]
  3782. RFC 4301 Security Architecture for IP December 2005
  3783. IPv4, by checking the fragment offset value to ensure that no
  3784. non-initial fragments have a small enough offset to overlap port
  3785. fields that should be contained in the initial fragment. Recall that
  3786. the IPv4 MTU minimum is 576 bytes, and the max IP header length is 60
  3787. bytes, so any ports should be present in the initial fragment. If we
  3788. require all non-initial fragments to have an offset of, say, 128 or
  3789. greater, just to be on the safe side, this should prevent successful
  3790. attacks of this sort. If the intent is only to protect against this
  3791. sort of reassembly attack, this check need be implemented only by a
  3792. receiver.
  3793. IPv6 also has a fragment offset, carried in the fragmentation
  3794. extension header. However, IPv6 extension headers are variable in
  3795. length and there is no analogous max header length value that we can
  3796. use to check non-initial fragments, to reject ones that might be used
  3797. for an attack of the sort noted above. A receiver would need to
  3798. maintain state analogous to reassembly state, to provide equivalent
  3799. protection. So, only for IPv4 is it feasible to impose a fragment
  3800. offset check that would reject attacks designed to circumvent port
  3801. field checks by IPsec (or firewalls) when passing non-initial
  3802. fragments.
  3803. Another possible concern is that in some topologies and SPD
  3804. configurations this approach might result in an access control
  3805. surprise. The notion is that if we create an SA to carry ALL
  3806. (non-initial) fragments, then that SA would carry some traffic that
  3807. might otherwise arrive as plaintext via a separate path, e.g., a path
  3808. monitored by a proxy firewall. But, this concern arises only if the
  3809. other path allows initial fragments to traverse it without requiring
  3810. reassembly, presumably a bad idea for a proxy firewall. Nonetheless,
  3811. this does represent a potential problem in some topologies and under
  3812. certain assumptions with respect to SPD and (other) firewall rule
  3813. sets, and administrators need to be warned of this possibility.
  3814. A less serious concern is that non-initial fragments sent over a
  3815. non-initial fragment-only SA might represent a DoS opportunity, in
  3816. that they could be sent when no valid, initial fragment will ever
  3817. arrive. This might be used to attack hosts behind an SG or BITW
  3818. device. However, the incremental risk posed by this sort of attack,
  3819. which can be mounted only by hosts behind an SG or BITW device, seems
  3820. small.
  3821. If we interpret the ANY selector value as encompassing OPAQUE, then a
  3822. single SA with ANY values for both port fields would be able to
  3823. accommodate all traffic matching the S/D address and protocol traffic
  3824. selectors, an alternative to using the OPAQUE value. But, using ANY
  3825. Kent & Seo Standards Track [Page 92]
  3826. RFC 4301 Security Architecture for IP December 2005
  3827. here precludes multiple, distinct SAs between the same IPsec
  3828. implementations for the same address pairs and protocol. So, it is
  3829. not an exactly equivalent alternative.
  3830. Fundamentally, fragment handling problems arise only when more than
  3831. one SA is defined with the same S/D address and protocol selector
  3832. values, but with different port field selector values.
  3833. D.4. BYPASS/DISCARD Traffic
  3834. We also have to address the non-initial fragment processing issue for
  3835. BYPASS/DISCARD entries, independent of SA processing. This is
  3836. largely a local matter for two reasons:
  3837. 1) We have no means for coordinating SPD entries for such
  3838. traffic between IPsec implementations since IKE is not
  3839. invoked.
  3840. 2) Many of these entries refer to traffic that is NOT
  3841. directed to or received from a location that is using
  3842. IPsec. So there is no peer IPsec implementation with
  3843. which to coordinate via any means.
  3844. However, this document should provide guidance here, consistent with
  3845. our goal of offering a well-defined, access control function for all
  3846. traffic, relative to the IPsec boundary. To that end, this document
  3847. says that implementations MUST support fragment reassembly for
  3848. BYPASS/DISCARD traffic when port fields are specified. An
  3849. implementation also MUST permit a user or administrator to accept
  3850. such traffic or reject such traffic using the SPD conventions
  3851. described in Section 4.4.1. The concern is that BYPASS of a
  3852. cleartext, non-initial fragment arriving at an IPsec implementation
  3853. could undermine the security afforded IPsec-protected traffic
  3854. directed to the same destination. For example, consider an IPsec
  3855. implementation configured with an SPD entry that calls for
  3856. IPsec-protection of traffic between a specific source/destination
  3857. address pair, and for a specific protocol and destination port, e.g.,
  3858. TCP traffic on port 23 (Telnet). Assume that the implementation also
  3859. allows BYPASS of traffic from the same source/destination address
  3860. pair and protocol, but for a different destination port, e.g., port
  3861. 119 (NNTP). An attacker could send a non-initial fragment (with a
  3862. forged source address) that, if bypassed, could overlap with
  3863. IPsec-protected traffic from the same source and thus violate the
  3864. integrity of the IPsec-protected traffic. Requiring stateful
  3865. fragment checking for BYPASS entries with non-trivial port ranges
  3866. prevents attacks of this sort.
  3867. Kent & Seo Standards Track [Page 93]
  3868. RFC 4301 Security Architecture for IP December 2005
  3869. D.5. Just say no to ports?
  3870. It has been suggested that we could avoid the problems described
  3871. above by not allowing port field selectors to be used in tunnel mode.
  3872. But the discussion above shows this to be an unnecessarily stringent
  3873. approach, i.e., since no problems arise for the native OS and BITS
  3874. implementations. Moreover, some WG members have described scenarios
  3875. where use of tunnel mode SAs with (non-trivial) port field selectors
  3876. is appropriate. So the challenge is defining a strategy that can
  3877. deal with this problem in BITW and SG contexts. Also note that
  3878. BYPASS/DISCARD entries in the SPD that make use of ports pose the
  3879. same problems, irrespective of tunnel vs. transport mode notions.
  3880. Some folks have suggested that a firewall behind an SG or BITW should
  3881. be left to enforce port-level access controls and the effects of
  3882. fragmentation. However, this seems to be an incongruous suggestion
  3883. in that elsewhere in IPsec (e.g., in IKE payloads) we are concerned
  3884. about firewalls that always discard fragments. If many firewalls
  3885. don't pass fragments in general, why should we expect them to deal
  3886. with fragments in this case? So, this analysis rejects the suggestion
  3887. of disallowing use of port field selectors with tunnel mode SAs.
  3888. D.6. Other Suggested Solutions
  3889. One suggestion is to reassemble fragments at the sending IPsec
  3890. implementation, and thus avoid the problem entirely. This approach
  3891. is invisible to a receiver and thus could be adopted as a purely
  3892. local implementation option.
  3893. A more sophisticated version of this suggestion calls for
  3894. establishing and maintaining minimal state from each initial fragment
  3895. encountered, to allow non-initial fragments to be matched to the
  3896. right SAs or SPD/cache entries. This implies an extension to the
  3897. current processing model (and the old one). The IPsec implementation
  3898. would intercept all fragments; capture Source/Destination IP
  3899. addresses, protocol, packet ID, and port fields from initial
  3900. fragments; and then use this data to map non-initial fragments to SAs
  3901. that require port fields. If this approach is employed, the receiver
  3902. needs to employ an equivalent scheme, as it too must verify that
  3903. received fragments are consistent with SA selector values. A
  3904. non-initial fragment that arrives prior to an initial fragment could
  3905. be cached or discarded, awaiting arrival of the corresponding initial
  3906. fragment.
  3907. A downside of both approaches noted above is that they will not
  3908. always work. When a BITW device or SG is configured in a topology
  3909. that might allow some fragments for a packet to be processed at
  3910. different SGs or BITW devices, then there is no guarantee that all
  3911. Kent & Seo Standards Track [Page 94]
  3912. RFC 4301 Security Architecture for IP December 2005
  3913. fragments will ever arrive at the same IPsec device. This approach
  3914. also raises possible processing problems. If the sender caches
  3915. non-initial fragments until the corresponding initial fragment
  3916. arrives, buffering problems might arise, especially at high speeds.
  3917. If the non-initial fragments are discarded rather than cached, there
  3918. is no guarantee that traffic will ever pass, e.g., retransmission
  3919. will result in different packet IDs that cannot be matched with prior
  3920. transmissions. In any case, housekeeping procedures will be needed
  3921. to decide when to delete the fragment state data, adding some
  3922. complexity to the system. Nonetheless, this is a viable solution in
  3923. some topologies, and these are likely to be common topologies.
  3924. The Working Group rejected an earlier version of the convention of
  3925. creating an SA to carry only non-initial fragments, something that
  3926. was supported implicitly under the RFC 2401 model via use of OPAQUE
  3927. port fields, but never clearly articulated in RFC 2401. The
  3928. (rejected) text called for each non-initial fragment to be treated as
  3929. protocol 44 (the IPv6 fragment header protocol ID) by the sender and
  3930. receiver. This approach has the potential to make IPv4 and IPv6
  3931. fragment handling more uniform, but it does not fundamentally change
  3932. the problem, nor does it address the issue of fragment handling for
  3933. BYPASS/DISCARD traffic. Given the fragment overlap attack problem
  3934. that IPv6 poses, it does not seem that it is worth the effort to
  3935. adopt this strategy.
  3936. D.7. Consistency
  3937. Earlier, the WG agreed to allow an IPsec BITS, BITW, or SG to perform
  3938. fragmentation prior to IPsec processing. If this fragmentation is
  3939. performed after SA lookup at the sender, there is no "mapping to the
  3940. right SA" problem. But, the receiver still needs to be able to
  3941. verify that the non-initial fragments are consistent with the SA via
  3942. which they are received. Since the initial fragment might be lost en
  3943. route, the receiver encounters all of the potential problems noted
  3944. above. Thus, if we are to be consistent in our decisions, we need to
  3945. say how a receiver will deal with the non-initial fragments that
  3946. arrive.
  3947. D.8. Conclusions
  3948. There is no simple, uniform way to handle fragments in all contexts.
  3949. Different approaches work better in different contexts. Thus, this
  3950. document offers 3 choices -- one MUST and two MAYs. At some point in
  3951. the future, if the community gains experience with the two MAYs, they
  3952. may become SHOULDs or MUSTs or other approaches may be proposed.
  3953. Kent & Seo Standards Track [Page 95]
  3954. RFC 4301 Security Architecture for IP December 2005
  3955. Appendix E: Example of Supporting Nested SAs via SPD and Forwarding
  3956. Table Entries
  3957. This appendix provides an example of how to configure the SPD and
  3958. forwarding tables to support a nested pair of SAs, consistent with
  3959. the new processing model. For simplicity, this example assumes just
  3960. one SPD-I.
  3961. The goal in this example is to support a transport mode SA from A to
  3962. C, carried over a tunnel mode SA from A to B. For example, A might
  3963. be a laptop connected to the public Internet, B might be a firewall
  3964. that protects a corporate network, and C might be a server on the
  3965. corporate network that demands end-to-end authentication of A's
  3966. traffic.
  3967. +---+ +---+ +---+
  3968. | A |=====| B | | C |
  3969. | |------------| |
  3970. | |=====| | | |
  3971. +---+ +---+ +---+
  3972. A's SPD contains entries of the form:
  3973. Next Layer
  3974. Rule Local Remote Protocol Action
  3975. ---- ----- ------ ---------- -----------------------
  3976. 1 C A ESP BYPASS
  3977. 2 A C ICMP,ESP PROTECT(ESP,tunnel,integr+conf)
  3978. 3 A C ANY PROTECT(ESP,transport,integr-only)
  3979. 4 A B ICMP,IKE BYPASS
  3980. A's unprotected-side forwarding table is set so that outbound packets
  3981. destined for C are looped back to the protected side. A's
  3982. protected-side forwarding table is set so that inbound ESP packets
  3983. are looped back to the unprotected side. A's forwarding tables
  3984. contain entries of the form:
  3985. Unprotected-side forwarding table
  3986. Rule Local Remote Protocol Action
  3987. ---- ----- ------ -------- ---------------------------
  3988. 1 A C ANY loop back to protected side
  3989. 2 A B ANY forward to B
  3990. Kent & Seo Standards Track [Page 96]
  3991. RFC 4301 Security Architecture for IP December 2005
  3992. Protected-side forwarding table
  3993. Rule Local Remote Protocol Action
  3994. ---- ----- ------ -------- -----------------------------
  3995. 1 A C ESP loop back to unprotected side
  3996. An outbound TCP packet from A to C would match SPD rule 3 and have
  3997. transport mode ESP applied to it. The unprotected-side forwarding
  3998. table would then loop back the packet. The packet is compared
  3999. against SPD-I (see Figure 2), matches SPD rule 1, and so it is
  4000. BYPASSed. The packet is treated as an outbound packet and compared
  4001. against the SPD for a third time. This time it matches SPD rule 2,
  4002. so ESP is applied in tunnel mode. This time the forwarding table
  4003. doesn't loop back the packet, because the outer destination address
  4004. is B, so the packet goes out onto the wire.
  4005. An inbound TCP packet from C to A is wrapped in two ESP headers; the
  4006. outer header (ESP in tunnel mode) shows B as the source, whereas the
  4007. inner header (ESP transport mode) shows C as the source. Upon
  4008. arrival at A, the packet would be mapped to an SA based on the SPI,
  4009. have the outer header removed, and be decrypted and
  4010. integrity-checked. Then it would be matched against the SAD
  4011. selectors for this SA, which would specify C as the source and A as
  4012. the destination, derived from SPD rule 2. The protected-side
  4013. forwarding function would then send it back to the unprotected side
  4014. based on the addresses and the next layer protocol (ESP), indicative
  4015. of nesting. It is compared against SPD-O (see Figure 3) and found to
  4016. match SPD rule 1, so it is BYPASSed. The packet is mapped to an SA
  4017. based on the SPI, integrity-checked, and compared against the SAD
  4018. selectors derived from SPD rule 3. The forwarding function then
  4019. passes it up to the next layer, because it isn't an ESP packet.
  4020. Kent & Seo Standards Track [Page 97]
  4021. RFC 4301 Security Architecture for IP December 2005
  4022. References
  4023. Normative References
  4024. [BBCDWW98] Blake, S., Black, D., Carlson, M., Davies, E., Wang,
  4025. Z., and W. Weiss, "An Architecture for Differentiated
  4026. Service", RFC 2475, December 1998.
  4027. [Bra97] Bradner, S., "Key words for use in RFCs to Indicate
  4028. Requirement Level", BCP 14, RFC 2119, March 1997.
  4029. [CD98] Conta, A. and S. Deering, "Internet Control Message
  4030. Protocol (ICMPv6) for the Internet Protocol Version 6
  4031. (IPv6) Specification", RFC 2463, December 1998.
  4032. [DH98] Deering, S., and R. Hinden, "Internet Protocol,
  4033. Version 6 (IPv6) Specification", RFC 2460, December
  4034. 1998.
  4035. [Eas05] 3rd Eastlake, D., "Cryptographic Algorithm
  4036. Implementation Requirements For Encapsulating Security
  4037. Payload (ESP) and Authentication Header (AH)", RFC
  4038. 4305, December 2005.
  4039. [HarCar98] Harkins, D. and D. Carrel, "The Internet Key Exchange
  4040. (IKE)", RFC 2409, November 1998.
  4041. [Kau05] Kaufman, C., Ed., "The Internet Key Exchange (IKEv2)
  4042. Protocol", RFC 4306, December 2005.
  4043. [Ken05a] Kent, S., "IP Encapsulating Security Payload (ESP)",
  4044. RFC 4303, December 2005.
  4045. [Ken05b] Kent, S., "IP Authentication Header", RFC 4302,
  4046. December 2005.
  4047. [MD90] Mogul, J. and S. Deering, "Path MTU discovery", RFC
  4048. 1191, November 1990.
  4049. [Mobip] Johnson, D., Perkins, C., and J. Arkko, "Mobility
  4050. Support in IPv6", RFC 3775, June 2004.
  4051. [Pos81a] Postel, J., "Internet Protocol", STD 5, RFC 791,
  4052. September 1981.
  4053. [Pos81b] Postel, J., "Internet Control Message Protocol", RFC
  4054. 792, September 1981.
  4055. Kent & Seo Standards Track [Page 98]
  4056. RFC 4301 Security Architecture for IP December 2005
  4057. [Sch05] Schiller, J., "Cryptographic Algorithms for use in the
  4058. Internet Key Exchange Version 2 (IKEv2)", RFC 4307,
  4059. December 2005.
  4060. [WaKiHo97] Wahl, M., Kille, S., and T. Howes, "Lightweight
  4061. Directory Access Protocol (v3): UTF-8 String
  4062. Representation of Distinguished Names", RFC 2253,
  4063. December 1997.
  4064. Informative References
  4065. [CoSa04] Condell, M., and L. Sanchez, "On the Deterministic
  4066. Enforcement of Un-ordered Security Policies", BBN
  4067. Technical Memo 1346, March 2004.
  4068. [FaLiHaMeTr00] Farinacci, D., Li, T., Hanks, S., Meyer, D., and P.
  4069. Traina, "Generic Routing Encapsulation (GRE)", RFC
  4070. 2784, March 2000.
  4071. [Gro02] Grossman, D., "New Terminology and Clarifications for
  4072. Diffserv", RFC 3260, April 2002.
  4073. [HC03] Holbrook, H. and B. Cain, "Source Specific Multicast
  4074. for IP", Work in Progress, November 3, 2002.
  4075. [HA94] Haller, N. and R. Atkinson, "On Internet
  4076. Authentication", RFC 1704, October 1994.
  4077. [NiBlBaBL98] Nichols, K., Blake, S., Baker, F., and D. Black,
  4078. "Definition of the Differentiated Services Field (DS
  4079. Field) in the IPv4 and IPv6 Headers", RFC 2474,
  4080. December 1998.
  4081. [Per96] Perkins, C., "IP Encapsulation within IP", RFC 2003,
  4082. October 1996.
  4083. [RaFlBl01] Ramakrishnan, K., Floyd, S., and D. Black, "The
  4084. Addition of Explicit Congestion Notification (ECN) to
  4085. IP", RFC 3168, September 2001.
  4086. [RFC2401] Kent, S. and R. Atkinson, "Security Architecture for
  4087. the Internet Protocol", RFC 2401, November 1998.
  4088. [RFC2983] Black, D., "Differentiated Services and Tunnels", RFC
  4089. 2983, October 2000.
  4090. [RFC3547] Baugher, M., Weis, B., Hardjono, T., and H. Harney,
  4091. "The Group Domain of Interpretation", RFC 3547, July
  4092. 2003.
  4093. Kent & Seo Standards Track [Page 99]
  4094. RFC 4301 Security Architecture for IP December 2005
  4095. [RFC3740] Hardjono, T. and B. Weis, "The Multicast Group
  4096. Security Architecture", RFC 3740, March 2004.
  4097. [RaCoCaDe04] Rajahalme, J., Conta, A., Carpenter, B., and S.
  4098. Deering, "IPv6 Flow Label Specification", RFC 3697,
  4099. March 2004.
  4100. [Sch94] Schneier, B., Applied Cryptography, Section 8.6, John
  4101. Wiley & Sons, New York, NY, 1994.
  4102. [Shi00] Shirey, R., "Internet Security Glossary", RFC 2828,
  4103. May 2000.
  4104. [SMPT01] Shacham, A., Monsour, B., Pereira, R., and M. Thomas,
  4105. "IP Payload Compression Protocol (IPComp)", RFC 3173,
  4106. September 2001.
  4107. [ToEgWa04] Touch, J., Eggert, L., and Y. Wang, "Use of IPsec
  4108. Transport Mode for Dynamic Routing", RFC 3884,
  4109. September 2004.
  4110. [VK83] V.L. Voydock & S.T. Kent, "Security Mechanisms in
  4111. High-level Networks", ACM Computing Surveys, Vol. 15,
  4112. No. 2, June 1983.
  4113. Authors' Addresses
  4114. Stephen Kent
  4115. BBN Technologies
  4116. 10 Moulton Street
  4117. Cambridge, MA 02138
  4118. USA
  4119. Phone: +1 (617) 873-3988
  4120. EMail: kent@bbn.com
  4121. Karen Seo
  4122. BBN Technologies
  4123. 10 Moulton Street
  4124. Cambridge, MA 02138
  4125. USA
  4126. Phone: +1 (617) 873-3152
  4127. EMail: kseo@bbn.com
  4128. Kent & Seo Standards Track [Page 100]
  4129. RFC 4301 Security Architecture for IP December 2005
  4130. Full Copyright Statement
  4131. Copyright (C) The Internet Society (2005).
  4132. This document is subject to the rights, licenses and restrictions
  4133. contained in BCP 78, and except as set forth therein, the authors
  4134. retain all their rights.
  4135. This document and the information contained herein are provided on an
  4136. "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
  4137. OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
  4138. ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
  4139. INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
  4140. INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
  4141. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  4142. Intellectual Property
  4143. The IETF takes no position regarding the validity or scope of any
  4144. Intellectual Property Rights or other rights that might be claimed to
  4145. pertain to the implementation or use of the technology described in
  4146. this document or the extent to which any license under such rights
  4147. might or might not be available; nor does it represent that it has
  4148. made any independent effort to identify any such rights. Information
  4149. on the procedures with respect to rights in RFC documents can be
  4150. found in BCP 78 and BCP 79.
  4151. Copies of IPR disclosures made to the IETF Secretariat and any
  4152. assurances of licenses to be made available, or the result of an
  4153. attempt made to obtain a general license or permission for the use of
  4154. such proprietary rights by implementers or users of this
  4155. specification can be obtained from the IETF on-line IPR repository at
  4156. http://www.ietf.org/ipr.
  4157. The IETF invites any interested party to bring to its attention any
  4158. copyrights, patents or patent applications, or other proprietary
  4159. rights that may cover technology that may be required to implement
  4160. this standard. Please address the information to the IETF at ietf-
  4161. ipr@ietf.org.
  4162. Acknowledgement
  4163. Funding for the RFC Editor function is currently provided by the
  4164. Internet Society.
  4165. Kent & Seo Standards Track [Page 101]