cve-2024-47689
Vulnerability from cvelistv5
Published
2024-10-21 11:53
Modified
2024-12-19 09:26
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: f2fs: fix to don't set SB_RDONLY in f2fs_handle_critical_error() syzbot reports a f2fs bug as below: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 58 at kernel/rcu/sync.c:177 rcu_sync_dtor+0xcd/0x180 kernel/rcu/sync.c:177 CPU: 1 UID: 0 PID: 58 Comm: kworker/1:2 Not tainted 6.10.0-syzkaller-12562-g1722389b0d86 #0 Workqueue: events destroy_super_work RIP: 0010:rcu_sync_dtor+0xcd/0x180 kernel/rcu/sync.c:177 Call Trace: percpu_free_rwsem+0x41/0x80 kernel/locking/percpu-rwsem.c:42 destroy_super_work+0xec/0x130 fs/super.c:282 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 As Christian Brauner pointed out [1]: the root cause is f2fs sets SB_RDONLY flag in internal function, rather than setting the flag covered w/ sb->s_umount semaphore via remount procedure, then below race condition causes this bug: - freeze_super() - sb_wait_write(sb, SB_FREEZE_WRITE) - sb_wait_write(sb, SB_FREEZE_PAGEFAULT) - sb_wait_write(sb, SB_FREEZE_FS) - f2fs_handle_critical_error - sb->s_flags |= SB_RDONLY - thaw_super - thaw_super_locked - sb_rdonly() is true, so it skips sb_freeze_unlock(sb, SB_FREEZE_FS) - deactivate_locked_super Since f2fs has almost the same logic as ext4 [2] when handling critical error in filesystem if it mounts w/ errors=remount-ro option: - set CP_ERROR_FLAG flag which indicates filesystem is stopped - record errors to superblock - set SB_RDONLY falg Once we set CP_ERROR_FLAG flag, all writable interfaces can detect the flag and stop any further updates on filesystem. So, it is safe to not set SB_RDONLY flag, let's remove the logic and keep in line w/ ext4 [3]. [1] https://lore.kernel.org/all/20240729-himbeeren-funknetz-96e62f9c7aee@brauner [2] https://lore.kernel.org/all/20240729132721.hxih6ehigadqf7wx@quack3 [3] https://lore.kernel.org/linux-ext4/20240805201241.27286-1-jack@suse.cz
Impacted products
Vendor Product Version
Linux Linux Version: b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5
Version: b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5
Version: b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5
Version: b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5
Create a notification for this product.
   Linux Linux Version: 6.5
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-47689",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-10-21T13:06:11.931921Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-10-21T13:14:15.437Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/f2fs/super.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "649ec8b30df113042588bd3d3cd4e98bcb1091e0",
              "status": "affected",
              "version": "b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5",
              "versionType": "git"
            },
            {
              "lessThan": "de43021c72993877a8f86f9fddfa0687609da5a4",
              "status": "affected",
              "version": "b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5",
              "versionType": "git"
            },
            {
              "lessThan": "1f63f405c1a1a64b9c310388aad7055fb86b245c",
              "status": "affected",
              "version": "b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5",
              "versionType": "git"
            },
            {
              "lessThan": "930c6ab93492c4b15436524e704950b364b2930c",
              "status": "affected",
              "version": "b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/f2fs/super.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.5"
            },
            {
              "lessThan": "6.5",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.54",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.10.*",
              "status": "unaffected",
              "version": "6.10.13",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.11.*",
              "status": "unaffected",
              "version": "6.11.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.12",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix to don\u0027t set SB_RDONLY in f2fs_handle_critical_error()\n\nsyzbot reports a f2fs bug as below:\n\n------------[ cut here ]------------\nWARNING: CPU: 1 PID: 58 at kernel/rcu/sync.c:177 rcu_sync_dtor+0xcd/0x180 kernel/rcu/sync.c:177\nCPU: 1 UID: 0 PID: 58 Comm: kworker/1:2 Not tainted 6.10.0-syzkaller-12562-g1722389b0d86 #0\nWorkqueue: events destroy_super_work\nRIP: 0010:rcu_sync_dtor+0xcd/0x180 kernel/rcu/sync.c:177\nCall Trace:\n percpu_free_rwsem+0x41/0x80 kernel/locking/percpu-rwsem.c:42\n destroy_super_work+0xec/0x130 fs/super.c:282\n process_one_work kernel/workqueue.c:3231 [inline]\n process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312\n worker_thread+0x86d/0xd40 kernel/workqueue.c:3390\n kthread+0x2f0/0x390 kernel/kthread.c:389\n ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147\n ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244\n\nAs Christian Brauner pointed out [1]: the root cause is f2fs sets\nSB_RDONLY flag in internal function, rather than setting the flag\ncovered w/ sb-\u003es_umount semaphore via remount procedure, then below\nrace condition causes this bug:\n\n- freeze_super()\n - sb_wait_write(sb, SB_FREEZE_WRITE)\n - sb_wait_write(sb, SB_FREEZE_PAGEFAULT)\n - sb_wait_write(sb, SB_FREEZE_FS)\n\t\t\t\t\t- f2fs_handle_critical_error\n\t\t\t\t\t - sb-\u003es_flags |= SB_RDONLY\n- thaw_super\n - thaw_super_locked\n  - sb_rdonly() is true, so it skips\n    sb_freeze_unlock(sb, SB_FREEZE_FS)\n  - deactivate_locked_super\n\nSince f2fs has almost the same logic as ext4 [2] when handling critical\nerror in filesystem if it mounts w/ errors=remount-ro option:\n- set CP_ERROR_FLAG flag which indicates filesystem is stopped\n- record errors to superblock\n- set SB_RDONLY falg\nOnce we set CP_ERROR_FLAG flag, all writable interfaces can detect the\nflag and stop any further updates on filesystem. So, it is safe to not\nset SB_RDONLY flag, let\u0027s remove the logic and keep in line w/ ext4 [3].\n\n[1] https://lore.kernel.org/all/20240729-himbeeren-funknetz-96e62f9c7aee@brauner\n[2] https://lore.kernel.org/all/20240729132721.hxih6ehigadqf7wx@quack3\n[3] https://lore.kernel.org/linux-ext4/20240805201241.27286-1-jack@suse.cz"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-12-19T09:26:08.341Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/649ec8b30df113042588bd3d3cd4e98bcb1091e0"
        },
        {
          "url": "https://git.kernel.org/stable/c/de43021c72993877a8f86f9fddfa0687609da5a4"
        },
        {
          "url": "https://git.kernel.org/stable/c/1f63f405c1a1a64b9c310388aad7055fb86b245c"
        },
        {
          "url": "https://git.kernel.org/stable/c/930c6ab93492c4b15436524e704950b364b2930c"
        }
      ],
      "title": "f2fs: fix to don\u0027t set SB_RDONLY in f2fs_handle_critical_error()",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-47689",
    "datePublished": "2024-10-21T11:53:29.185Z",
    "dateReserved": "2024-09-30T16:00:12.941Z",
    "dateUpdated": "2024-12-19T09:26:08.341Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-47689\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-10-21T12:15:05.733\",\"lastModified\":\"2024-10-23T15:53:06.410\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nf2fs: fix to don\u0027t set SB_RDONLY in f2fs_handle_critical_error()\\n\\nsyzbot reports a f2fs bug as below:\\n\\n------------[ cut here ]------------\\nWARNING: CPU: 1 PID: 58 at kernel/rcu/sync.c:177 rcu_sync_dtor+0xcd/0x180 kernel/rcu/sync.c:177\\nCPU: 1 UID: 0 PID: 58 Comm: kworker/1:2 Not tainted 6.10.0-syzkaller-12562-g1722389b0d86 #0\\nWorkqueue: events destroy_super_work\\nRIP: 0010:rcu_sync_dtor+0xcd/0x180 kernel/rcu/sync.c:177\\nCall Trace:\\n percpu_free_rwsem+0x41/0x80 kernel/locking/percpu-rwsem.c:42\\n destroy_super_work+0xec/0x130 fs/super.c:282\\n process_one_work kernel/workqueue.c:3231 [inline]\\n process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312\\n worker_thread+0x86d/0xd40 kernel/workqueue.c:3390\\n kthread+0x2f0/0x390 kernel/kthread.c:389\\n ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147\\n ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244\\n\\nAs Christian Brauner pointed out [1]: the root cause is f2fs sets\\nSB_RDONLY flag in internal function, rather than setting the flag\\ncovered w/ sb-\u003es_umount semaphore via remount procedure, then below\\nrace condition causes this bug:\\n\\n- freeze_super()\\n - sb_wait_write(sb, SB_FREEZE_WRITE)\\n - sb_wait_write(sb, SB_FREEZE_PAGEFAULT)\\n - sb_wait_write(sb, SB_FREEZE_FS)\\n\\t\\t\\t\\t\\t- f2fs_handle_critical_error\\n\\t\\t\\t\\t\\t - sb-\u003es_flags |= SB_RDONLY\\n- thaw_super\\n - thaw_super_locked\\n  - sb_rdonly() is true, so it skips\\n    sb_freeze_unlock(sb, SB_FREEZE_FS)\\n  - deactivate_locked_super\\n\\nSince f2fs has almost the same logic as ext4 [2] when handling critical\\nerror in filesystem if it mounts w/ errors=remount-ro option:\\n- set CP_ERROR_FLAG flag which indicates filesystem is stopped\\n- record errors to superblock\\n- set SB_RDONLY falg\\nOnce we set CP_ERROR_FLAG flag, all writable interfaces can detect the\\nflag and stop any further updates on filesystem. So, it is safe to not\\nset SB_RDONLY flag, let\u0027s remove the logic and keep in line w/ ext4 [3].\\n\\n[1] https://lore.kernel.org/all/20240729-himbeeren-funknetz-96e62f9c7aee@brauner\\n[2] https://lore.kernel.org/all/20240729132721.hxih6ehigadqf7wx@quack3\\n[3] https://lore.kernel.org/linux-ext4/20240805201241.27286-1-jack@suse.cz\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: f2fs: correcci\u00f3n para no establecer SB_RDONLY en f2fs_handle_critical_error() syzbot informa un error de f2fs como se muestra a continuaci\u00f3n: ------------[ cortar aqu\u00ed ]------------ ADVERTENCIA: CPU: 1 PID: 58 en kernel/rcu/sync.c:177 rcu_sync_dtor+0xcd/0x180 kernel/rcu/sync.c:177 CPU: 1 UID: 0 PID: 58 Comm: kworker/1:2 No contaminado 6.10.0-syzkaller-12562-g1722389b0d86 #0 Cola de trabajo: eventos destroy_super_work RIP: 0010:rcu_sync_dtor+0xcd/0x180 kernel/rcu/sync.c:177 Rastreo de llamadas: percpu_free_rwsem+0x41/0x80 kernel/locking/percpu-rwsem.c:42 destroy_super_work+0xec/0x130 fs/super.c:282 process_one_work kernel/workqueue.c:3231 [en l\u00ednea] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Como cristiano Brauner se\u00f1al\u00f3 [1]: la causa ra\u00edz es que f2fs establece el indicador SB_RDONLY en la funci\u00f3n interna, en lugar de establecer el indicador cubierto con el sem\u00e1foro sb-\u0026gt;s_umount a trav\u00e9s del procedimiento de remontaje, luego la siguiente condici\u00f3n de ejecuci\u00f3n causa este error: - freeze_super() - sb_wait_write(sb, SB_FREEZE_WRITE) - sb_wait_write(sb, SB_FREEZE_PAGEFAULT) - sb_wait_write(sb, SB_FREEZE_FS) - f2fs_handle_critical_error - sb-\u0026gt;s_flags |= SB_RDONLY - thaw_super - thaw_super_locked - sb_rdonly() es verdadero, por lo que omite sb_freeze_unlock(sb, SB_FREEZE_FS) - deactivate_locked_super Dado que f2fs tiene casi la misma l\u00f3gica que ext4 [2] al manejar error cr\u00edtico en el sistema de archivos si se monta con la opci\u00f3n errors=remount-ro: - establecer el indicador CP_ERROR_FLAG que indica que el sistema de archivos est\u00e1 detenido - registrar errores en el superbloque - establecer el indicador SB_RDONLY Una vez que establecemos el indicador CP_ERROR_FLAG, todas las interfaces escribibles pueden detectar el indicador y detener cualquier actualizaci\u00f3n futura en el sistema de archivos. Por lo tanto, es seguro no establecer el indicador SB_RDONLY, eliminemos la l\u00f3gica y sigamos en l\u00ednea con ext4 [3]. [1] https://lore.kernel.org/all/20240729-himbeeren-funknetz-96e62f9c7aee@brauner [2] https://lore.kernel.org/all/20240729132721.hxih6ehigadqf7wx@quack3 [3] https://lore.kernel.org/linux-ext4/202408052 01241.27286-1-jack@suse.cz\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.3,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"HIGH\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.6,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-362\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.4.4\",\"versionEndExcluding\":\"6.5\",\"matchCriteriaId\":\"3F74080D-0441-4EFD-AB4D-F8C72C720E7A\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.5\",\"versionEndExcluding\":\"6.6.54\",\"matchCriteriaId\":\"533A887F-F2B4-4445-8C73-11A8013D0A01\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.7\",\"versionEndExcluding\":\"6.10.13\",\"matchCriteriaId\":\"CE94BB8D-B0AB-4563-9ED7-A12122B56EBE\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.11\",\"versionEndExcluding\":\"6.11.2\",\"matchCriteriaId\":\"AB755D26-97F4-43B6-8604-CD076811E181\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1f63f405c1a1a64b9c310388aad7055fb86b245c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/649ec8b30df113042588bd3d3cd4e98bcb1091e0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/930c6ab93492c4b15436524e704950b364b2930c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/de43021c72993877a8f86f9fddfa0687609da5a4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-47689\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-10-21T13:06:11.931921Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-10-21T13:06:15.254Z\"}}], \"cna\": {\"title\": \"f2fs: fix to don\u0027t set SB_RDONLY in f2fs_handle_critical_error()\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5\", \"lessThan\": \"649ec8b30df113042588bd3d3cd4e98bcb1091e0\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5\", \"lessThan\": \"de43021c72993877a8f86f9fddfa0687609da5a4\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5\", \"lessThan\": \"1f63f405c1a1a64b9c310388aad7055fb86b245c\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5\", \"lessThan\": \"930c6ab93492c4b15436524e704950b364b2930c\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/f2fs/super.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"6.5\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"6.5\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.6.54\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.10.13\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.10.*\"}, {\"status\": \"unaffected\", \"version\": \"6.11.2\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.11.*\"}, {\"status\": \"unaffected\", \"version\": \"6.12\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/f2fs/super.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/649ec8b30df113042588bd3d3cd4e98bcb1091e0\"}, {\"url\": \"https://git.kernel.org/stable/c/de43021c72993877a8f86f9fddfa0687609da5a4\"}, {\"url\": \"https://git.kernel.org/stable/c/1f63f405c1a1a64b9c310388aad7055fb86b245c\"}, {\"url\": \"https://git.kernel.org/stable/c/930c6ab93492c4b15436524e704950b364b2930c\"}], \"x_generator\": {\"engine\": \"bippy-5f407fcff5a0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nf2fs: fix to don\u0027t set SB_RDONLY in f2fs_handle_critical_error()\\n\\nsyzbot reports a f2fs bug as below:\\n\\n------------[ cut here ]------------\\nWARNING: CPU: 1 PID: 58 at kernel/rcu/sync.c:177 rcu_sync_dtor+0xcd/0x180 kernel/rcu/sync.c:177\\nCPU: 1 UID: 0 PID: 58 Comm: kworker/1:2 Not tainted 6.10.0-syzkaller-12562-g1722389b0d86 #0\\nWorkqueue: events destroy_super_work\\nRIP: 0010:rcu_sync_dtor+0xcd/0x180 kernel/rcu/sync.c:177\\nCall Trace:\\n percpu_free_rwsem+0x41/0x80 kernel/locking/percpu-rwsem.c:42\\n destroy_super_work+0xec/0x130 fs/super.c:282\\n process_one_work kernel/workqueue.c:3231 [inline]\\n process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312\\n worker_thread+0x86d/0xd40 kernel/workqueue.c:3390\\n kthread+0x2f0/0x390 kernel/kthread.c:389\\n ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147\\n ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244\\n\\nAs Christian Brauner pointed out [1]: the root cause is f2fs sets\\nSB_RDONLY flag in internal function, rather than setting the flag\\ncovered w/ sb-\u003es_umount semaphore via remount procedure, then below\\nrace condition causes this bug:\\n\\n- freeze_super()\\n - sb_wait_write(sb, SB_FREEZE_WRITE)\\n - sb_wait_write(sb, SB_FREEZE_PAGEFAULT)\\n - sb_wait_write(sb, SB_FREEZE_FS)\\n\\t\\t\\t\\t\\t- f2fs_handle_critical_error\\n\\t\\t\\t\\t\\t - sb-\u003es_flags |= SB_RDONLY\\n- thaw_super\\n - thaw_super_locked\\n  - sb_rdonly() is true, so it skips\\n    sb_freeze_unlock(sb, SB_FREEZE_FS)\\n  - deactivate_locked_super\\n\\nSince f2fs has almost the same logic as ext4 [2] when handling critical\\nerror in filesystem if it mounts w/ errors=remount-ro option:\\n- set CP_ERROR_FLAG flag which indicates filesystem is stopped\\n- record errors to superblock\\n- set SB_RDONLY falg\\nOnce we set CP_ERROR_FLAG flag, all writable interfaces can detect the\\nflag and stop any further updates on filesystem. So, it is safe to not\\nset SB_RDONLY flag, let\u0027s remove the logic and keep in line w/ ext4 [3].\\n\\n[1] https://lore.kernel.org/all/20240729-himbeeren-funknetz-96e62f9c7aee@brauner\\n[2] https://lore.kernel.org/all/20240729132721.hxih6ehigadqf7wx@quack3\\n[3] https://lore.kernel.org/linux-ext4/20240805201241.27286-1-jack@suse.cz\"}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2024-12-19T09:26:08.341Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-47689\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-12-19T09:26:08.341Z\", \"dateReserved\": \"2024-09-30T16:00:12.941Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-10-21T11:53:29.185Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.