llama.cpp provides LLM inference in C/C++. The unsafe type member in the rpc_tensor structure can cause global-buffer-overflow. This vulnerability may lead to memory data leakage. The vulnerability is fixed in b3561.
{
"cwe_ids": [
"CWE-125"
]
}[
{
"signature_type": "Function",
"digest": {
"function_hash": "63821502456618340864466117432507220778",
"length": 961.0
},
"target": {
"file": "ggml/src/ggml-rpc.cpp",
"function": "rpc_server::get_tensor"
},
"signature_version": "v1",
"id": "CVE-2024-42477-6ab0b785",
"deprecated": false,
"source": "https://github.com/ggerganov/llama.cpp/commit/b72942fac998672a79a1ae3c03b340f7e629980b"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "231431000156330641922152469921782839193",
"length": 806.0
},
"target": {
"file": "ggml/src/ggml-rpc.cpp",
"function": "rpc_server::deserialize_tensor"
},
"signature_version": "v1",
"id": "CVE-2024-42477-7a4cad7d",
"deprecated": false,
"source": "https://github.com/ggerganov/llama.cpp/commit/b72942fac998672a79a1ae3c03b340f7e629980b"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "316435155798464475238003033725977387276",
"length": 570.0
},
"target": {
"file": "ggml/src/ggml-rpc.cpp",
"function": "create_server_socket"
},
"signature_version": "v1",
"id": "CVE-2024-42477-7de715b1",
"deprecated": false,
"source": "https://github.com/ggerganov/llama.cpp/commit/b72942fac998672a79a1ae3c03b340f7e629980b"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"3556498864182725207370657190085397054",
"226140164335128206544998058155104350566",
"73573464900202717095035404701461627647",
"169678720521327894379704555404530274657",
"127060067183493799720420818201884378477",
"22490585394404299941162860707706243772",
"146639049550061137610393574010653864509",
"13660241412339133519566689124953351914",
"264394359020740449014330016894462218876",
"336948460363613383715694708061307837427",
"216151526884398845698287194648255258674",
"45512334342138256334311795667337862192",
"55786480050974048529046707364829815019",
"49639945146728551079166126191033499144",
"95025149850102586507974599186305793135",
"294835296296399398121834268167863306917",
"299586542734593610154759094070554233540",
"141271373788498584715552700804029265664",
"247730873478979018328761276907157343975",
"121633363123596882716464448225967538456"
]
},
"target": {
"file": "ggml/src/ggml-rpc.cpp"
},
"signature_version": "v1",
"id": "CVE-2024-42477-85f05f03",
"deprecated": false,
"source": "https://github.com/ggerganov/llama.cpp/commit/b72942fac998672a79a1ae3c03b340f7e629980b"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"271572407699314025195283238855551518414",
"310946831983885646783297454974971535069",
"82633950792597410975890369325838168857",
"281371870591635933181993830891822073566",
"243945867312070382472149816221374789529",
"248687641000826021848487115887797001882",
"110444123371042099193998492097271040339",
"290927117162544082140218837649367144582"
]
},
"target": {
"file": "examples/rpc/rpc-server.cpp"
},
"signature_version": "v1",
"id": "CVE-2024-42477-aca8b62d",
"deprecated": false,
"source": "https://github.com/ggerganov/llama.cpp/commit/b72942fac998672a79a1ae3c03b340f7e629980b"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "289970808481783314127674829919462574040",
"length": 674.0
},
"target": {
"file": "examples/rpc/rpc-server.cpp",
"function": "main"
},
"signature_version": "v1",
"id": "CVE-2024-42477-b0576f3e",
"deprecated": false,
"source": "https://github.com/ggerganov/llama.cpp/commit/b72942fac998672a79a1ae3c03b340f7e629980b"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "158311576906414393442232515220051546956",
"length": 927.0
},
"target": {
"file": "ggml/src/ggml-rpc.cpp",
"function": "rpc_server::set_tensor"
},
"signature_version": "v1",
"id": "CVE-2024-42477-b08d3754",
"deprecated": false,
"source": "https://github.com/ggerganov/llama.cpp/commit/b72942fac998672a79a1ae3c03b340f7e629980b"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "74062177812026214841235971571867501113",
"length": 2081.0
},
"target": {
"file": "ggml/src/ggml.c",
"function": "ggml_new_tensor_impl"
},
"signature_version": "v1",
"id": "CVE-2024-42477-d1628447",
"deprecated": false,
"source": "https://github.com/ggerganov/llama.cpp/commit/b72942fac998672a79a1ae3c03b340f7e629980b"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"230342835319375915085116436832850606835",
"115023619577659908278462692006583295580",
"262574360625967651056547345943053265276",
"265649783209477333308527022877416267285"
]
},
"target": {
"file": "ggml/src/ggml.c"
},
"signature_version": "v1",
"id": "CVE-2024-42477-e005df36",
"deprecated": false,
"source": "https://github.com/ggerganov/llama.cpp/commit/b72942fac998672a79a1ae3c03b340f7e629980b"
}
]