{"id":"CVE-2022-49993","aliases":["CVE-2022-49993"],"related":[],"kind":"vulnerability","state":"published","title":"loop: Check for overflow while configuring loop","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nloop: Check for overflow while configuring loop\n\nThe userspace can configure a loop using an ioctl call, wherein\na configuration of type loop_config is passed (see lo_ioctl()'s\ncase on line 1550 of drivers/block/loop.c). This proceeds to call\nloop_configure() which in turn calls loop_set_status_from_info()\n(see line 1050 of loop.c), passing &config->info which is of type\nloop_info64*. This function then sets the appropriate values, like\nthe offset.\n\nloop_device has lo_offset of type loff_t (see line 52 of loop.c),\nwhich is typdef-chained to long long, whereas loop_info64 has\nlo_offset of type __u64 (see line 56 of include/uapi/linux/loop.h).\n\nThe function directly copies offset from info to the device as\nfollows (See line 980 of loop.c):\n\tlo->lo_offset = info->lo_offset;\n\nThis results in an overflow, which triggers a warning in iomap_iter()\ndue to a call to iomap_iter_done() which has:\n\tWARN_ON_ONCE(iter->iomap.offset > iter->pos);\n\nThus, check for negative value during loop_set_status_from_info().\n\nBug report: https://syzkaller.appspot.com/bug?id=c620fe14aac810396d3c3edc9ad73848bf69a29e","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nloop: Check for overflow while configuring loop\n\nThe userspace can configure a loop using an ioctl call, wherein\na configuration of type loop_config is passed (see lo_ioctl()'s\ncase on line 1550 of drivers/block/loop.c). This proceeds to call\nloop_configure() which in turn calls loop_set_status_from_info()\n(see line 1050 of loop.c), passing &config->info which is of type\nloop_info64*. This function then sets the appropriate values, like\nthe offset.\n\nloop_device has lo_offset of type loff_t (see line 52 of loop.c),\nwhich is typdef-chained to long long, whereas loop_info64 has\nlo_offset of type __u64 (see line 56 of include/uapi/linux/loop.h).\n\nThe function directly copies offset from info to the device as\nfollows (See line 980 of loop.c):\n\tlo->lo_offset = info->lo_offset;\n\nThis results in an overflow, which triggers a warning in iomap_iter()\ndue to a call to iomap_iter_done() which has:\n\tWARN_ON_ONCE(iter->iomap.offset > iter->pos);\n\nThus, check for negative value during loop_set_status_from_info().\n\nBug report: https://syzkaller.appspot.com/bug?id=c620fe14aac810396d3c3edc9ad73848bf69a29e","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: loop: Comprobar si hay desbordamiento al configurar loop El espacio de usuario puede configurar un bucle mediante una llamada ioctl, en la que se pasa una configuración de tipo loop_config (consulte el caso de lo_ioctl() en la línea 1550 de drivers/block/loop.c). Esto procede a llamar a loop_configure() que a su vez llama a loop_set_status_from_info() (consulte la línea 1050 de loop.c), pasando &amp;config-&gt;info que es de tipo loop_info64*. Esta función luego establece los valores apropiados, como el desplazamiento. loop_device tiene lo_offset de tipo loff_t (consulte la línea 52 de loop.c), que está encadenado por typdef a long long, mientras que loop_info64 tiene lo_offset de tipo __u64 (consulte la línea 56 de include/uapi/linux/loop.h). La función copia directamente el desplazamiento de info al dispositivo como se indica a continuación (véase la línea 980 de loop.c): lo-&gt;lo_offset = info-&gt;lo_offset; Esto genera un desbordamiento que genera una advertencia en iomap_iter() debido a una llamada a iomap_iter_done() que tiene: WARN_ON_ONCE(iter-&gt;iomap.offset &gt; iter-&gt;pos); Por lo tanto, se debe verificar si hay un valor negativo durante loop_set_status_from_info(). Informe de error: https://syzkaller.appspot.com/bug?id=c620fe14aac810396d3c3edc9ad73848bf69a29e","source":"nvd"}],"published":"2025-06-18T11:00:53.487Z","modified":"2026-11-05T20:17:20.027Z","severity":{"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"},"severities":[{"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":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"18e28817cb516b39de6281f6db9b0618b2cc7b42","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"adf0112d9b8acb03485624220b4934f69bf13369","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"a217715338fd48f72114725aa7a40e484a781ca7","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"b40877b8562c5720d0a7fce20729f56b75a3dede","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"6858933131d0dadac071c4d33335a9ea4b8e76cf","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"0455bef69028c65065f16bb04635591b2374249b","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"9be7fa7ead18a48940df7b59d993bbc8b9055c15","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"c490a0b5a4f36da3918181a8acdc6991d967c5f3","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.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.12","status":"unaffected"},{"type":"semver","introduced":"4.9.327","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.292","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.312","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.274","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.140","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.64","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.19.6","lastAffected":"5.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.0","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":"4.9.327"},{"status":"affected","introduced":"4.10","fixed":"4.14.292"},{"status":"affected","introduced":"4.15","fixed":"4.19.312"},{"status":"affected","introduced":"4.20","fixed":"5.4.274"},{"status":"affected","introduced":"5.5","fixed":"5.10.140"},{"status":"affected","introduced":"5.11","fixed":"5.15.64"},{"status":"affected","introduced":"5.16","fixed":"5.19.6"},{"status":"affected","version":"6.0"},{"status":"affected","version":"6.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/18e28817cb516b39de6281f6db9b0618b2cc7b42","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/adf0112d9b8acb03485624220b4934f69bf13369","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a217715338fd48f72114725aa7a40e484a781ca7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b40877b8562c5720d0a7fce20729f56b75a3dede","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6858933131d0dadac071c4d33335a9ea4b8e76cf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0455bef69028c65065f16bb04635591b2374249b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9be7fa7ead18a48940df7b59d993bbc8b9055c15","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c490a0b5a4f36da3918181a8acdc6991d967c5f3","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T19:52:33.900Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49993","url":"https://www.cve.org/CVERecord?id=CVE-2022-49993","licence":"CVE Terms of Use","modified":"2026-11-05T20:00:13.340Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49993","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49993","licence":"Public domain","modified":"2026-11-05T20:17:20.027Z"}],"updatedAt":"2026-11-25T22:58:20.999Z","epss":{"score":0.0028,"percentile":0.13009,"date":"2026-11-30T12:00:22.000Z"}}