{"resultsPerPage":1,"startIndex":0,"totalResults":1,"format":"NVD_CVE","version":"2.0","timestamp":"2026-04-18T18:22:16.687","vulnerabilities":[{"cve":{"id":"CVE-2024-43891","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2024-08-26T11:15:04.103","lastModified":"2024-09-05T18:46:18.440","vulnStatus":"Analyzed","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ntracing: Have format file honor EVENT_FILE_FL_FREED\n\nWhen eventfs was introduced, special care had to be done to coordinate the\nfreeing of the file meta data with the files that are exposed to user\nspace. The file meta data would have a ref count that is set when the file\nis created and would be decremented and freed after the last user that\nopened the file closed it. When the file meta data was to be freed, it\nwould set a flag (EVENT_FILE_FL_FREED) to denote that the file is freed,\nand any new references made (like new opens or reads) would fail as it is\nmarked freed. This allowed other meta data to be freed after this flag was\nset (under the event_mutex).\n\nAll the files that were dynamically created in the events directory had a\npointer to the file meta data and would call event_release() when the last\nreference to the user space file was closed. This would be the time that it\nis safe to free the file meta data.\n\nA shortcut was made for the \"format\" file. It's i_private would point to\nthe \"call\" entry directly and not point to the file's meta data. This is\nbecause all format files are the same for the same \"call\", so it was\nthought there was no reason to differentiate them.  The other files\nmaintain state (like the \"enable\", \"trigger\", etc). But this meant if the\nfile were to disappear, the \"format\" file would be unaware of it.\n\nThis caused a race that could be trigger via the user_events test (that\nwould create dynamic events and free them), and running a loop that would\nread the user_events format files:\n\nIn one console run:\n\n # cd tools/testing/selftests/user_events\n # while true; do ./ftrace_test; done\n\nAnd in another console run:\n\n # cd /sys/kernel/tracing/\n # while true; do cat events/user_events/__test_event/format; done 2>/dev/null\n\nWith KASAN memory checking, it would trigger a use-after-free bug report\n(which was a real bug). This was because the format file was not checking\nthe file's meta data flag \"EVENT_FILE_FL_FREED\", so it would access the\nevent that the file meta data pointed to after the event was freed.\n\nAfter inspection, there are other locations that were found to not check\nthe EVENT_FILE_FL_FREED flag when accessing the trace_event_file. Add a\nnew helper function: event_file_file() that will make sure that the\nevent_mutex is held, and will return NULL if the trace_event_file has the\nEVENT_FILE_FL_FREED flag set. Have the first reference of the struct file\npointer use event_file_file() and check for NULL. Later uses can still use\nthe event_file_data() helper function if the event_mutex is still held and\nwas not released since the event_file_file() call."},{"lang":"es","value":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: rastreo: Tener formato de archivo honorífico EVENT_FILE_FL_FREED Cuando se introdujo eventfs, se tuvo que tener especial cuidado para coordinar la liberación de los metadatos del archivo con los archivos que están expuestos al espacio del usuario. Los metadatos del archivo tendrían un recuento de referencias que se establece cuando se crea el archivo y se reducirían y liberarían después de que el último usuario que abrió el archivo lo cerró. Cuando se iban a liberar los metadatos del archivo, se establecería un indicador (EVENT_FILE_FL_FREED) para indicar que el archivo está liberado, y cualquier nueva referencia realizada (como nuevas aperturas o lecturas) fallaría ya que se marca como liberado. Esto permitió liberar otros metadatos después de establecer este indicador (bajo event_mutex). Todos los archivos que se crearon dinámicamente en el directorio de eventos tenían un puntero a los metadatos del archivo y llamarían a event_release() cuando se cerrara la última referencia al archivo de espacio de usuario. Este sería el momento en el que será seguro liberar los metadatos del archivo. Se creó un acceso directo para el archivo \"formato\". Es i_private apuntaría a la entrada \"llamar\" directamente y no a los metadatos del archivo. Esto se debe a que todos los archivos de formato son iguales para una misma \"llamada\", por lo que se pensó que no había motivo para diferenciarlos. Los otros archivos mantienen el estado (como \"habilitar\", \"activar\", etc.). Pero esto significaba que si el archivo desapareciera, el archivo \"formateado\" no lo sabría. Esto provocó una ejecución que podría desencadenarse a través de la prueba user_events (que crearía eventos dinámicos y los liberaría) y ejecutar un bucle que leería los archivos de formato user_events: En una ejecución de consola: # cd tools/testing/selftests/user_events # si bien es cierto; hacer ./ftrace_test; hecho Y en otra consola ejecute: # cd /sys/kernel/tracing/ # while true; hacer eventos de gato/eventos_usuario/__test_event/formato; done 2&gt;/dev/null Con la comprobación de memoria de KASAN, se activaría un informe de error de use-after-free (que era un error real). Esto se debía a que el archivo de formato no estaba verificando el indicador de metadatos del archivo \"EVENT_FILE_FL_FREED\", por lo que accedería al evento al que apuntaban los metadatos del archivo después de que se liberara el evento. Después de la inspección, se encontró que hay otras ubicaciones que no marcaban el indicador EVENT_FILE_FL_FREED al acceder a trace_event_file. Agregue una nueva función auxiliar: event_file_file() que garantizará que event_mutex se mantenga y devolverá NULL si trace_event_file tiene establecido el indicador EVENT_FILE_FL_FREED. Haga que la primera referencia del puntero del archivo de estructura use event_file_file() y verifique NULL. Los usos posteriores aún pueden usar la función auxiliar event_file_data() si event_mutex aún se mantiene y no se liberó desde la llamada event_file_file()."}],"metrics":{"cvssMetricV31":[{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":4.7,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":1.0,"impactScore":3.6}]},"weaknesses":[{"source":"nvd@nist.gov","type":"Primary","description":[{"lang":"en","value":"CWE-416"}]}],"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.33","versionEndExcluding":"6.6.49","matchCriteriaId":"EF5E99A7-E570-41C0-81D1-35491C9A68B1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.10.5","matchCriteriaId":"F07BD0FF-07AF-4DAD-8EB1-09FB50ABDC47"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.11:rc1:*:*:*:*:*:*","matchCriteriaId":"8B3CE743-2126-47A3-8B7C-822B502CF119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.11:rc2:*:*:*:*:*:*","matchCriteriaId":"4DEB27E7-30AA-45CC-8934-B89263EF3551"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/4ed03758ddf0b19d69eed69386d65a92d0091e0c","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/531dc6780d94245af037c25c2371c8caf652f0f9","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/b1560408692cd0ab0370cfbe9deb03ce97ab3f6d","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]}]}}]}