TensorFlow is an end-to-end open source platform for machine learning. Due to lack of validation in tf.raw_ops.RaggedTensorToTensor, an attacker can exploit an undefined behavior if input arguments are empty. The implementation(https://github.com/tensorflow/tensorflow/blob/656e7673b14acd7835dc778867f84916c6d1cac2/tensorflow/core/kernels/raggedtensortotensorop.cc#L356-L360) only checks that one of the tensors is not empty, but does not check for the other ones. There are multiple DCHECK validations to prevent heap OOB, but these are no-op in release builds, hence they don't prevent anything. The fix will be included in TensorFlow 2.5.0. We will also cherrypick these commits on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.
{
"versions": [
{
"introduced": "0"
},
{
"fixed": "2.1.4"
},
{
"introduced": "2.2.0"
},
{
"fixed": "2.2.3"
},
{
"introduced": "2.3.0"
},
{
"fixed": "2.3.3"
},
{
"introduced": "2.4.0"
},
{
"fixed": "2.4.2"
}
]
}[
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2021-29608-68d9f390",
"target": {
"file": "tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"249125983411237778077357819018283228101",
"224225715799553139835089081014822499096",
"89771992617694012861121810825654946439",
"57697706386363761551520552450951936154",
"173116402065283144941021544294863588812",
"47679337683675975583932308822958650277",
"11144949190430349860178379568497870552",
"245805652595465449079994929785890654734",
"102425096751956106258985037720504503995",
"159668403106193831194856579617896296892",
"38183220989813737365513727035477222180",
"156156706975795986934815005834390715502",
"147586881926638651756449299782912906449",
"209356590531167267085439812288600526337",
"70918752554432641803879867457934640029",
"135301078357798866027025190198850196994",
"1186475045450812353824322895200941531",
"134223807494517121514473982267299999601",
"204775446420127901152275085876230632212",
"105811780005781227693434087604319227862",
"270305002660176484138203960881787944840",
"130598382842540853021323520735610211888",
"16482891946551912352838656644856888937",
"97860040454334985656194126645928942115",
"200102702869818704062871055169725428057",
"142156975901606492553589811250991478621"
]
},
"signature_version": "v1",
"source": "https://github.com/tensorflow/tensorflow/commit/b761c9b652af2107cfbc33efd19be0ce41daa33e"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2021-29608-9bac07fd",
"target": {
"file": "tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"297848537437013270431059876612001787558",
"209681301969152117928165261862015457299",
"166018209318291324224501329322710774118",
"73482831109764674259720641944552373336",
"27829288452007872853762420861852460277",
"106835929023457931786732367699317880640",
"6170122786494338025413087051610846381",
"209921729186114257279926686470157071191",
"224037023355246668888069852437447355832",
"143122612808373158215428658515677481382",
"208559248787608483064716825123230289655",
"284939494610827365467037861468405145678",
"162402071281529480883019592886079948349",
"228444824470354092738758439020461505727",
"318261652120323461120165933659214545662",
"43728872660346604508597650386298090804",
"2410389750711933446027924866544607793",
"109415049946756972115994067483475735808",
"178981221351963592004832868886109842047",
"168846703144013571935572356498424677041",
"172833242916951617559730043353388337492",
"39982722071425773069656052018268020487",
"36144556323819937496649629866213117733",
"253723389608850802510055038890953831334",
"122464976018273334746325188826498386399",
"88757261466386833301521360041645675700",
"118712825691397195963095850034550967286",
"234532927204328953692114402209992425125",
"216770770446997022275815671259044096045",
"224754537680135727871139823445875427033",
"22934318445214743126769322219963062661",
"89791954598453925584347864246076726025",
"25287365442537521955879595358581124724",
"63978234852089265650844513113367784760",
"59566876241232561795442073805754572044",
"74914138686874437372339074698021476789",
"42283856558767351283720524026229941230",
"27337476825836754657814942664668922929",
"228598926067598159407557501040402032925",
"233200548681517801024212818062840620493",
"239197063647377325490780138600411303115",
"107396893034794526068403721316550754540",
"84365614028170489622265723408093974108",
"196176944167035235536574678998364004967",
"60275375074503957235107538518761234206",
"67131772162783293626026510912418085555",
"281529616106781670239324493612351330249",
"193402570767729763037094442176266763239",
"283946892745834898735418364879067586178",
"140468828843151079230033846747535869948"
]
},
"signature_version": "v1",
"source": "https://github.com/tensorflow/tensorflow/commit/c4d7afb6a5986b04505aca4466ae1951686c80f6"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2021-29608-c2ba6324",
"target": {
"file": "tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"167043840453157900431467451878395386366",
"278994113256611250724258513999170603783",
"183963932834839107604429801913804307147",
"322451706284865770715113899046288408491"
]
},
"signature_version": "v1",
"source": "https://github.com/tensorflow/tensorflow/commit/f94ef358bb3e91d517446454edff6535bcfe8e4a"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29608.json"