{"id":"CVE-2025-68299","aliases":["CVE-2025-68299"],"related":[],"kind":"vulnerability","state":"published","title":"afs: Fix delayed allocation of a cell's anonymous key","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nafs: Fix delayed allocation of a cell's anonymous key\n\nThe allocation of a cell's anonymous key is done in a background thread\nalong with other cell setup such as doing a DNS upcall.  In the reported\nbug, this is triggered by afs_parse_source() parsing the device name given\nto mount() and calling afs_lookup_cell() with the name of the cell.\n\nThe normal key lookup then tries to use the key description on the\nanonymous authentication key as the reference for request_key() - but it\nmay not yet be set and so an oops can happen.\n\nThis has been made more likely to happen by the fix for dynamic lookup\nfailure.\n\nFix this by firstly allocating a reference name and attaching it to the\nafs_cell record when the record is created.  It can share the memory\nallocation with the cell name (unfortunately it can't just overlap the cell\nname by prepending it with \"afs@\" as the cell name already has a '.'\nprepended for other purposes).  This reference name is then passed to\nrequest_key().\n\nSecondly, the anon key is now allocated on demand at the point a key is\nrequested in afs_request_key() if it is not already allocated.  A mutex is\nused to prevent multiple allocation for a cell.\n\nThirdly, make afs_request_key_rcu() return NULL if the anonymous key isn't\nyet allocated (if we need it) and then the caller can return -ECHILD to\ndrop out of RCU-mode and afs_request_key() can be called.\n\nNote that the anonymous key is kind of necessary to make the key lookup\ncache work as that doesn't currently cache a negative lookup, but it's\nprobably worth some investigation to see if NULL can be used instead.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nafs: Fix delayed allocation of a cell's anonymous key\n\nThe allocation of a cell's anonymous key is done in a background thread\nalong with other cell setup such as doing a DNS upcall.  In the reported\nbug, this is triggered by afs_parse_source() parsing the device name given\nto mount() and calling afs_lookup_cell() with the name of the cell.\n\nThe normal key lookup then tries to use the key description on the\nanonymous authentication key as the reference for request_key() - but it\nmay not yet be set and so an oops can happen.\n\nThis has been made more likely to happen by the fix for dynamic lookup\nfailure.\n\nFix this by firstly allocating a reference name and attaching it to the\nafs_cell record when the record is created.  It can share the memory\nallocation with the cell name (unfortunately it can't just overlap the cell\nname by prepending it with \"afs@\" as the cell name already has a '.'\nprepended for other purposes).  This reference name is then passed to\nrequest_key().\n\nSecondly, the anon key is now allocated on demand at the point a key is\nrequested in afs_request_key() if it is not already allocated.  A mutex is\nused to prevent multiple allocation for a cell.\n\nThirdly, make afs_request_key_rcu() return NULL if the anonymous key isn't\nyet allocated (if we need it) and then the caller can return -ECHILD to\ndrop out of RCU-mode and afs_request_key() can be called.\n\nNote that the anonymous key is kind of necessary to make the key lookup\ncache work as that doesn't currently cache a negative lookup, but it's\nprobably worth some investigation to see if NULL can be used instead.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nafs: Corrección de la asignación retrasada de la clave anónima de una celda\n\nLa asignación de la clave anónima de una celda se realiza en un hilo en segundo plano junto con otras configuraciones de celda, como realizar una llamada ascendente (upcall) de DNS. En el error reportado, esto es provocado por afs_parse_source() analizando el nombre del dispositivo dado a mount() y llamando a afs_lookup_cell() con el nombre de la celda.\n\nLa búsqueda normal de clave luego intenta usar la descripción de la clave en la clave de autenticación anónima como referencia para request_key(), pero es posible que aún no esté establecida y, por lo tanto, puede ocurrir un oops.\n\nEsto se ha vuelto más propenso a ocurrir por la corrección para el fallo de búsqueda dinámica.\n\nCorrija esto, en primer lugar, asignando un nombre de referencia y adjuntándolo al registro afs_cell cuando se crea el registro. Puede compartir la asignación de memoria con el nombre de la celda (desafortunadamente, no puede simplemente superponer el nombre de la celda anteponiéndole 'afs@' ya que el nombre de la celda ya tiene un '.' antepuesto para otros propósitos). Este nombre de referencia luego se pasa a request_key().\n\nEn segundo lugar, la clave anónima ahora se asigna bajo demanda en el momento en que se solicita una clave en afs_request_key() si aún no está asignada. Se utiliza un mutex para evitar múltiples asignaciones para una celda.\n\nEn tercer lugar, haga que afs_request_key_rcu() devuelva NULL si la clave anónima aún no está asignada (si la necesitamos) y luego el llamador puede devolver -ECHILD para salir del modo RCU y se puede llamar a afs_request_key().\n\nTenga en cuenta que la clave anónima es algo necesaria para que la caché de búsqueda de claves funcione, ya que actualmente no almacena en caché una búsqueda negativa, pero probablemente valga la pena investigar para ver si se puede usar NULL en su lugar.","source":"nvd"}],"published":"2025-12-16T15:06:18.246Z","modified":"2026-10-14T16:10:00.250Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"fa4ccdccf1489a6dac4369a8c69f11b455b3355c","fixed":"bd18d2cbc9377c6b270c0b7ea44b0e6ed1d99c07","status":"affected"},{"type":"git","introduced":"7e33b15d5a6578a99ebf189cea34983270ae92dd","fixed":"5613bde937dfac6725e9c3fc766b9d6b8481e55b","status":"affected"},{"type":"git","introduced":"330e2c514823008b22e6afd2055715bc46dd8d55","fixed":"d27c71257825dced46104eefe42e4d9964bd032e","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"6.17.9","fixed":"6.17.11","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/bd18d2cbc9377c6b270c0b7ea44b0e6ed1d99c07","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5613bde937dfac6725e9c3fc766b9d6b8481e55b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d27c71257825dced46104eefe42e4d9964bd032e","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68299","url":"https://www.cve.org/CVERecord?id=CVE-2025-68299","licence":"CVE Terms of Use","modified":"2026-08-03T09:32:28.315Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68299","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68299","licence":"Public domain","modified":"2026-10-14T16:10:00.250Z"}],"updatedAt":"2026-11-25T22:59:09.532Z","epss":{"score":0.00217,"percentile":0.12911,"date":"2026-12-01T12:00:22.000Z"}}