{"id":"CVE-2025-38710","aliases":["CVE-2025-38710"],"related":[],"kind":"vulnerability","state":"published","title":"gfs2: Validate i_depth for exhash directories","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ngfs2: Validate i_depth for exhash directories\n\nA fuzzer test introduced corruption that ends up with a depth of 0 in\ndir_e_read(), causing an undefined shift by 32 at:\n\n  index = hash >> (32 - dip->i_depth);\n\nAs calculated in an open-coded way in dir_make_exhash(), the minimum\ndepth for an exhash directory is ilog2(sdp->sd_hash_ptrs) and 0 is\ninvalid as sdp->sd_hash_ptrs is fixed as sdp->bsize / 16 at mount time.\n\nSo we can avoid the undefined behaviour by checking for depth values\nlower than the minimum in gfs2_dinode_in(). Values greater than the\nmaximum are already being checked for there.\n\nAlso switch the calculation in dir_make_exhash() to use ilog2() to\nclarify how the depth is calculated.\n\nTested with the syzkaller repro.c and xfstests '-g quick'.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ngfs2: Validate i_depth for exhash directories\n\nA fuzzer test introduced corruption that ends up with a depth of 0 in\ndir_e_read(), causing an undefined shift by 32 at:\n\n  index = hash >> (32 - dip->i_depth);\n\nAs calculated in an open-coded way in dir_make_exhash(), the minimum\ndepth for an exhash directory is ilog2(sdp->sd_hash_ptrs) and 0 is\ninvalid as sdp->sd_hash_ptrs is fixed as sdp->bsize / 16 at mount time.\n\nSo we can avoid the undefined behaviour by checking for depth values\nlower than the minimum in gfs2_dinode_in(). Values greater than the\nmaximum are already being checked for there.\n\nAlso switch the calculation in dir_make_exhash() to use ilog2() to\nclarify how the depth is calculated.\n\nTested with the syzkaller repro.c and xfstests '-g quick'.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad:\n\ngfs2: Validar i_depth para directorios exhash\n\nUna prueba de fuzzer introdujo corrupción que resulta en una profundidad de 0 en dir_e_read(), causando un desplazamiento indefinido de 32 en:\n\nindex = hash >> (32 - dip->i_depth);\n\nSegún se calcula de forma abierta en dir_make_exhash(), la profundidad mínima para un directorio exhash es ilog2(sdp->sd_hash_ptrs) y 0 no es válido ya que sdp->sd_hash_ptrs se fija como sdp->bsize / 16 en el momento del montaje.\n\nAsí podemos evitar el comportamiento indefinido comprobando los valores de profundidad inferiores al mínimo en gfs2_dinode_in(). Los valores mayores que el máximo ya se están comprobando allí.\n\nTambién cambiar el cálculo en dir_make_exhash() para usar ilog2() para clarificar cómo se calcula la profundidad.\n\nProbado con syzkaller repro.c y xfstests '-g quick'.","source":"nvd"}],"published":"2025-09-04T15:33:00.629Z","modified":"2026-10-19T21:10:00.160Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"9a0045088d888c9c539c8c626a366cb52c0fbdab","fixed":"076e992752e4b24178918f748d75597c80a408d2","status":"affected"},{"type":"git","introduced":"9a0045088d888c9c539c8c626a366cb52c0fbdab","fixed":"366183911b153e9b8cf758e1414e1154d7569337","status":"affected"},{"type":"git","introduced":"9a0045088d888c9c539c8c626a366cb52c0fbdab","fixed":"112bb60cd0e254a369e95aa9941a694ffeca089f","status":"affected"},{"type":"git","introduced":"9a0045088d888c9c539c8c626a366cb52c0fbdab","fixed":"cddea0c721106ea480371412d8de21705eb27376","status":"affected"},{"type":"git","introduced":"9a0045088d888c9c539c8c626a366cb52c0fbdab","fixed":"53a0249d68a210c16e961b83adfa82f94ee0a53d","status":"affected"},{"type":"git","introduced":"9a0045088d888c9c539c8c626a366cb52c0fbdab","fixed":"b5f46951e62377b6e406fadc18bc3c5bdf1632a7","status":"affected"},{"type":"git","introduced":"9a0045088d888c9c539c8c626a366cb52c0fbdab","fixed":"9680c58675b82348ab84d387e4fa727f7587e1a0","status":"affected"},{"type":"git","introduced":"9a0045088d888c9c539c8c626a366cb52c0fbdab","fixed":"557c024ca7250bb65ae60f16c02074106c2f197b","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.26","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.26","status":"unaffected"},{"type":"semver","introduced":"5.10.258","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.209","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.175","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.134","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.43","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.11","lastAffected":"6.15.*","status":"unaffected"},{"type":"semver","introduced":"6.16.2","lastAffected":"6.16.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.17","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"6.12.43"},{"status":"affected","introduced":"6.13","fixed":"6.15.11"},{"status":"affected","introduced":"6.16","fixed":"6.16.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/076e992752e4b24178918f748d75597c80a408d2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/366183911b153e9b8cf758e1414e1154d7569337","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/112bb60cd0e254a369e95aa9941a694ffeca089f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cddea0c721106ea480371412d8de21705eb27376","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/53a0249d68a210c16e961b83adfa82f94ee0a53d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b5f46951e62377b6e406fadc18bc3c5bdf1632a7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9680c58675b82348ab84d387e4fa727f7587e1a0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/557c024ca7250bb65ae60f16c02074106c2f197b","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-15T21:52:51.698Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38710","url":"https://www.cve.org/CVERecord?id=CVE-2025-38710","licence":"CVE Terms of Use","modified":"2026-10-15T22:02:28.235Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38710","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38710","licence":"Public domain","modified":"2026-10-19T21:10:00.160Z"}],"updatedAt":"2026-11-25T22:59:04.152Z","epss":{"score":0.00175,"percentile":0.07235,"date":"2026-12-01T12:00:22.000Z"}}