cve-2021-47460
Vulnerability from cvelistv5
Published
2024-05-22 06:23
Modified
2024-12-19 07:42
Severity ?
EPSS score ?
0.11% (0.26237)
Summary
In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix data corruption after conversion from inline format Commit 6dbf7bb55598 ("fs: Don't invalidate page buffers in block_write_full_page()") uncovered a latent bug in ocfs2 conversion from inline inode format to a normal inode format. The code in ocfs2_convert_inline_data_to_extents() attempts to zero out the whole cluster allocated for file data by grabbing, zeroing, and dirtying all pages covering this cluster. However these pages are beyond i_size, thus writeback code generally ignores these dirty pages and no blocks were ever actually zeroed on the disk. This oversight was fixed by commit 693c241a5f6a ("ocfs2: No need to zero pages past i_size.") for standard ocfs2 write path, inline conversion path was apparently forgotten; the commit log also has a reasoning why the zeroing actually is not needed. After commit 6dbf7bb55598, things became worse as writeback code stopped invalidating buffers on pages beyond i_size and thus these pages end up with clean PageDirty bit but with buffers attached to these pages being still dirty. So when a file is converted from inline format, then writeback triggers, and then the file is grown so that these pages become valid, the invalid dirtiness state is preserved, mark_buffer_dirty() does nothing on these pages (buffers are already dirty) but page is never written back because it is clean. So data written to these pages is lost once pages are reclaimed. Simple reproducer for the problem is: xfs_io -f -c "pwrite 0 2000" -c "pwrite 2000 2000" -c "fsync" \ -c "pwrite 4000 2000" ocfs2_file After unmounting and mounting the fs again, you can observe that end of 'ocfs2_file' has lost its contents. Fix the problem by not doing the pointless zeroing during conversion from inline format similarly as in the standard write path. [akpm@linux-foundation.org: fix whitespace, per Joseph]
References
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/5314454ea3ff6fc746eaf71b9a7ceebed52888fa
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/560edd14de2bf9dbc0129681eeb4d5ef87cc105f
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/8e6bfb4f70168ddfd32fb6dc028ad52faaf1f32e
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/a3a089c241cd49b33a8cdd7fcb37cc87a086912a
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/b05caf023b14cbed9223bb5b48ecc7bffe38f632
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/f1b98569e81c37d7e0deada7172f8f60860c1360
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/fa9b6b6c953e3f6441ed6cf83b4c771dac2dae08
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/5314454ea3ff6fc746eaf71b9a7ceebed52888fa
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/560edd14de2bf9dbc0129681eeb4d5ef87cc105f
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/8e6bfb4f70168ddfd32fb6dc028ad52faaf1f32e
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/a3a089c241cd49b33a8cdd7fcb37cc87a086912a
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/b05caf023b14cbed9223bb5b48ecc7bffe38f632
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/f1b98569e81c37d7e0deada7172f8f60860c1360
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/fa9b6b6c953e3f6441ed6cf83b4c771dac2dae08
Impacted products
Vendor Product Version
Linux Linux Version: acef5107e2eacb08a16ad5db60320d65bd26a6c0
Version: 7ed80e77c908cbaa686529a49f8ae0060c5caee7
Version: 7ce2b16bad2cbfa3fa7bbc42c4448914f639ca47
Version: f8a6a2ed4b7d1c3c8631eeb6d00572bc853094a8
Version: 6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b
Version: 6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b
Version: 6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b
Create a notification for this product.
   Linux Linux Version: 5.10
Create a notification for this product.
Show details on NVD website


{
   containers: {
      adp: [
         {
            metrics: [
               {
                  other: {
                     content: {
                        id: "CVE-2021-47460",
                        options: [
                           {
                              Exploitation: "none",
                           },
                           {
                              Automatable: "no",
                           },
                           {
                              "Technical Impact": "partial",
                           },
                        ],
                        role: "CISA Coordinator",
                        timestamp: "2024-06-26T14:38:02.997186Z",
                        version: "2.0.3",
                     },
                     type: "ssvc",
                  },
               },
            ],
            providerMetadata: {
               dateUpdated: "2024-06-26T14:38:12.616Z",
               orgId: "134c704f-9b21-4f2e-91b3-4a467353bcc0",
               shortName: "CISA-ADP",
            },
            title: "CISA ADP Vulnrichment",
         },
         {
            providerMetadata: {
               dateUpdated: "2024-08-04T05:39:58.992Z",
               orgId: "af854a3a-2127-422b-91ae-364da2661108",
               shortName: "CVE",
            },
            references: [
               {
                  tags: [
                     "x_transferred",
                  ],
                  url: "https://git.kernel.org/stable/c/560edd14de2bf9dbc0129681eeb4d5ef87cc105f",
               },
               {
                  tags: [
                     "x_transferred",
                  ],
                  url: "https://git.kernel.org/stable/c/8e6bfb4f70168ddfd32fb6dc028ad52faaf1f32e",
               },
               {
                  tags: [
                     "x_transferred",
                  ],
                  url: "https://git.kernel.org/stable/c/a3a089c241cd49b33a8cdd7fcb37cc87a086912a",
               },
               {
                  tags: [
                     "x_transferred",
                  ],
                  url: "https://git.kernel.org/stable/c/b05caf023b14cbed9223bb5b48ecc7bffe38f632",
               },
               {
                  tags: [
                     "x_transferred",
                  ],
                  url: "https://git.kernel.org/stable/c/f1b98569e81c37d7e0deada7172f8f60860c1360",
               },
               {
                  tags: [
                     "x_transferred",
                  ],
                  url: "https://git.kernel.org/stable/c/fa9b6b6c953e3f6441ed6cf83b4c771dac2dae08",
               },
               {
                  tags: [
                     "x_transferred",
                  ],
                  url: "https://git.kernel.org/stable/c/5314454ea3ff6fc746eaf71b9a7ceebed52888fa",
               },
            ],
            title: "CVE Program Container",
         },
      ],
      cna: {
         affected: [
            {
               defaultStatus: "unaffected",
               product: "Linux",
               programFiles: [
                  "fs/ocfs2/alloc.c",
               ],
               repo: "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               vendor: "Linux",
               versions: [
                  {
                     lessThan: "560edd14de2bf9dbc0129681eeb4d5ef87cc105f",
                     status: "affected",
                     version: "acef5107e2eacb08a16ad5db60320d65bd26a6c0",
                     versionType: "git",
                  },
                  {
                     lessThan: "8e6bfb4f70168ddfd32fb6dc028ad52faaf1f32e",
                     status: "affected",
                     version: "7ed80e77c908cbaa686529a49f8ae0060c5caee7",
                     versionType: "git",
                  },
                  {
                     lessThan: "a3a089c241cd49b33a8cdd7fcb37cc87a086912a",
                     status: "affected",
                     version: "7ce2b16bad2cbfa3fa7bbc42c4448914f639ca47",
                     versionType: "git",
                  },
                  {
                     lessThan: "b05caf023b14cbed9223bb5b48ecc7bffe38f632",
                     status: "affected",
                     version: "f8a6a2ed4b7d1c3c8631eeb6d00572bc853094a8",
                     versionType: "git",
                  },
                  {
                     lessThan: "f1b98569e81c37d7e0deada7172f8f60860c1360",
                     status: "affected",
                     version: "6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b",
                     versionType: "git",
                  },
                  {
                     lessThan: "fa9b6b6c953e3f6441ed6cf83b4c771dac2dae08",
                     status: "affected",
                     version: "6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b",
                     versionType: "git",
                  },
                  {
                     lessThan: "5314454ea3ff6fc746eaf71b9a7ceebed52888fa",
                     status: "affected",
                     version: "6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b",
                     versionType: "git",
                  },
               ],
            },
            {
               defaultStatus: "affected",
               product: "Linux",
               programFiles: [
                  "fs/ocfs2/alloc.c",
               ],
               repo: "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               vendor: "Linux",
               versions: [
                  {
                     status: "affected",
                     version: "5.10",
                  },
                  {
                     lessThan: "5.10",
                     status: "unaffected",
                     version: "0",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "4.9.*",
                     status: "unaffected",
                     version: "4.9.288",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "4.14.*",
                     status: "unaffected",
                     version: "4.14.253",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "4.19.*",
                     status: "unaffected",
                     version: "4.19.214",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "5.4.*",
                     status: "unaffected",
                     version: "5.4.156",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "5.10.*",
                     status: "unaffected",
                     version: "5.10.76",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "5.14.*",
                     status: "unaffected",
                     version: "5.14.15",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "*",
                     status: "unaffected",
                     version: "5.15",
                     versionType: "original_commit_for_fix",
                  },
               ],
            },
         ],
         descriptions: [
            {
               lang: "en",
               value: "In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: fix data corruption after conversion from inline format\n\nCommit 6dbf7bb55598 (\"fs: Don't invalidate page buffers in\nblock_write_full_page()\") uncovered a latent bug in ocfs2 conversion\nfrom inline inode format to a normal inode format.\n\nThe code in ocfs2_convert_inline_data_to_extents() attempts to zero out\nthe whole cluster allocated for file data by grabbing, zeroing, and\ndirtying all pages covering this cluster.  However these pages are\nbeyond i_size, thus writeback code generally ignores these dirty pages\nand no blocks were ever actually zeroed on the disk.\n\nThis oversight was fixed by commit 693c241a5f6a (\"ocfs2: No need to zero\npages past i_size.\") for standard ocfs2 write path, inline conversion\npath was apparently forgotten; the commit log also has a reasoning why\nthe zeroing actually is not needed.\n\nAfter commit 6dbf7bb55598, things became worse as writeback code stopped\ninvalidating buffers on pages beyond i_size and thus these pages end up\nwith clean PageDirty bit but with buffers attached to these pages being\nstill dirty.  So when a file is converted from inline format, then\nwriteback triggers, and then the file is grown so that these pages\nbecome valid, the invalid dirtiness state is preserved,\nmark_buffer_dirty() does nothing on these pages (buffers are already\ndirty) but page is never written back because it is clean.  So data\nwritten to these pages is lost once pages are reclaimed.\n\nSimple reproducer for the problem is:\n\n  xfs_io -f -c \"pwrite 0 2000\" -c \"pwrite 2000 2000\" -c \"fsync\" \\\n    -c \"pwrite 4000 2000\" ocfs2_file\n\nAfter unmounting and mounting the fs again, you can observe that end of\n'ocfs2_file' has lost its contents.\n\nFix the problem by not doing the pointless zeroing during conversion\nfrom inline format similarly as in the standard write path.\n\n[akpm@linux-foundation.org: fix whitespace, per Joseph]",
            },
         ],
         providerMetadata: {
            dateUpdated: "2024-12-19T07:42:49.842Z",
            orgId: "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            shortName: "Linux",
         },
         references: [
            {
               url: "https://git.kernel.org/stable/c/560edd14de2bf9dbc0129681eeb4d5ef87cc105f",
            },
            {
               url: "https://git.kernel.org/stable/c/8e6bfb4f70168ddfd32fb6dc028ad52faaf1f32e",
            },
            {
               url: "https://git.kernel.org/stable/c/a3a089c241cd49b33a8cdd7fcb37cc87a086912a",
            },
            {
               url: "https://git.kernel.org/stable/c/b05caf023b14cbed9223bb5b48ecc7bffe38f632",
            },
            {
               url: "https://git.kernel.org/stable/c/f1b98569e81c37d7e0deada7172f8f60860c1360",
            },
            {
               url: "https://git.kernel.org/stable/c/fa9b6b6c953e3f6441ed6cf83b4c771dac2dae08",
            },
            {
               url: "https://git.kernel.org/stable/c/5314454ea3ff6fc746eaf71b9a7ceebed52888fa",
            },
         ],
         title: "ocfs2: fix data corruption after conversion from inline format",
         x_generator: {
            engine: "bippy-5f407fcff5a0",
         },
      },
   },
   cveMetadata: {
      assignerOrgId: "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      assignerShortName: "Linux",
      cveId: "CVE-2021-47460",
      datePublished: "2024-05-22T06:23:21.724Z",
      dateReserved: "2024-05-22T06:20:56.197Z",
      dateUpdated: "2024-12-19T07:42:49.842Z",
      state: "PUBLISHED",
   },
   dataType: "CVE_RECORD",
   dataVersion: "5.1",
   "vulnerability-lookup:meta": {
      nvd: "{\"cve\":{\"id\":\"CVE-2021-47460\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-22T07:15:10.940\",\"lastModified\":\"2024-11-21T06:36:11.843\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nocfs2: fix data corruption after conversion from inline format\\n\\nCommit 6dbf7bb55598 (\\\"fs: Don't invalidate page buffers in\\nblock_write_full_page()\\\") uncovered a latent bug in ocfs2 conversion\\nfrom inline inode format to a normal inode format.\\n\\nThe code in ocfs2_convert_inline_data_to_extents() attempts to zero out\\nthe whole cluster allocated for file data by grabbing, zeroing, and\\ndirtying all pages covering this cluster.  However these pages are\\nbeyond i_size, thus writeback code generally ignores these dirty pages\\nand no blocks were ever actually zeroed on the disk.\\n\\nThis oversight was fixed by commit 693c241a5f6a (\\\"ocfs2: No need to zero\\npages past i_size.\\\") for standard ocfs2 write path, inline conversion\\npath was apparently forgotten; the commit log also has a reasoning why\\nthe zeroing actually is not needed.\\n\\nAfter commit 6dbf7bb55598, things became worse as writeback code stopped\\ninvalidating buffers on pages beyond i_size and thus these pages end up\\nwith clean PageDirty bit but with buffers attached to these pages being\\nstill dirty.  So when a file is converted from inline format, then\\nwriteback triggers, and then the file is grown so that these pages\\nbecome valid, the invalid dirtiness state is preserved,\\nmark_buffer_dirty() does nothing on these pages (buffers are already\\ndirty) but page is never written back because it is clean.  So data\\nwritten to these pages is lost once pages are reclaimed.\\n\\nSimple reproducer for the problem is:\\n\\n  xfs_io -f -c \\\"pwrite 0 2000\\\" -c \\\"pwrite 2000 2000\\\" -c \\\"fsync\\\" \\\\\\n    -c \\\"pwrite 4000 2000\\\" ocfs2_file\\n\\nAfter unmounting and mounting the fs again, you can observe that end of\\n'ocfs2_file' has lost its contents.\\n\\nFix the problem by not doing the pointless zeroing during conversion\\nfrom inline format similarly as in the standard write path.\\n\\n[akpm@linux-foundation.org: fix whitespace, per Joseph]\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: ocfs2: corrige la corrupción de datos después de la conversión desde el formato en línea. el commit 6dbf7bb55598 (\\\"fs: No invalide los buffers de página en block_write_full_page()\\\") descubrió un error latente en la conversión de ocfs2 desde el inodo en línea. formato a un formato de inodo normal. El código en ocfs2_convert_inline_data_to_extents() intenta poner a cero todo el clúster asignado para datos de archivos capturando, poniendo a cero y ensuciando todas las páginas que cubren este clúster. Sin embargo, estas páginas están más allá de i_size, por lo que el código de reescritura generalmente ignora estas páginas sucias y nunca se puso a cero ningún bloque en el disco. Este descuido se solucionó mediante el commit 693c241a5f6a (\\\"ocfs2: No es necesario poner a cero las páginas después de i_size.\\\") para la ruta de escritura estándar de ocfs2, la ruta de conversión en línea aparentemente se olvidó; el registro de confirmación también tiene un razonamiento por el cual la puesta a cero en realidad no es necesaria. Después de el commit 6dbf7bb55598, las cosas empeoraron ya que el código de reescritura dejó de invalidar los buffers en páginas más allá de i_size y, por lo tanto, estas páginas terminan con un bit PageDirty limpio pero con los búferes adjuntos a estas páginas todavía sucios. Entonces, cuando un archivo se convierte desde un formato en línea, se activa la reescritura y luego el archivo crece para que estas páginas se vuelvan válidas, se conserva el estado de suciedad no válido, mark_buffer_dirty() no hace nada en estas páginas (los búferes ya están sucios), excepto la página nunca se vuelve a escribir porque está limpio. Por lo tanto, los datos escritos en estas páginas se pierden una vez que se recuperan las páginas. El reproductor simple para el problema es: xfs_io -f -c \\\"pwrite 0 2000\\\" -c \\\"pwrite 2000 2000\\\" -c \\\"fsync\\\" \\\\ -c \\\"pwrite 4000 2000\\\" ocfs2_file Después de desmontar y montar el fs nuevamente, puede observar que El final de 'ocfs2_file' ha perdido su contenido. Solucione el problema al no realizar la puesta a cero inútil durante la conversión desde el formato en línea de manera similar a como lo hace en la ruta de escritura estándar. [akpm@linux-foundation.org: arreglar espacios en blanco, según Joseph]\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/5314454ea3ff6fc746eaf71b9a7ceebed52888fa\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/560edd14de2bf9dbc0129681eeb4d5ef87cc105f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/8e6bfb4f70168ddfd32fb6dc028ad52faaf1f32e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a3a089c241cd49b33a8cdd7fcb37cc87a086912a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b05caf023b14cbed9223bb5b48ecc7bffe38f632\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f1b98569e81c37d7e0deada7172f8f60860c1360\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/fa9b6b6c953e3f6441ed6cf83b4c771dac2dae08\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5314454ea3ff6fc746eaf71b9a7ceebed52888fa\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/560edd14de2bf9dbc0129681eeb4d5ef87cc105f\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/8e6bfb4f70168ddfd32fb6dc028ad52faaf1f32e\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/a3a089c241cd49b33a8cdd7fcb37cc87a086912a\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/b05caf023b14cbed9223bb5b48ecc7bffe38f632\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/f1b98569e81c37d7e0deada7172f8f60860c1360\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/fa9b6b6c953e3f6441ed6cf83b4c771dac2dae08\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}",
      vulnrichment: {
         containers: "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/560edd14de2bf9dbc0129681eeb4d5ef87cc105f\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/8e6bfb4f70168ddfd32fb6dc028ad52faaf1f32e\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/a3a089c241cd49b33a8cdd7fcb37cc87a086912a\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/b05caf023b14cbed9223bb5b48ecc7bffe38f632\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/f1b98569e81c37d7e0deada7172f8f60860c1360\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/fa9b6b6c953e3f6441ed6cf83b4c771dac2dae08\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/5314454ea3ff6fc746eaf71b9a7ceebed52888fa\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-04T05:39:58.992Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2021-47460\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-06-26T14:38:02.997186Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-06-26T14:38:08.329Z\"}}], \"cna\": {\"title\": \"ocfs2: fix data corruption after conversion from inline format\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"acef5107e2eacb08a16ad5db60320d65bd26a6c0\", \"lessThan\": \"560edd14de2bf9dbc0129681eeb4d5ef87cc105f\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"7ed80e77c908cbaa686529a49f8ae0060c5caee7\", \"lessThan\": \"8e6bfb4f70168ddfd32fb6dc028ad52faaf1f32e\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"7ce2b16bad2cbfa3fa7bbc42c4448914f639ca47\", \"lessThan\": \"a3a089c241cd49b33a8cdd7fcb37cc87a086912a\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"f8a6a2ed4b7d1c3c8631eeb6d00572bc853094a8\", \"lessThan\": \"b05caf023b14cbed9223bb5b48ecc7bffe38f632\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b\", \"lessThan\": \"f1b98569e81c37d7e0deada7172f8f60860c1360\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b\", \"lessThan\": \"fa9b6b6c953e3f6441ed6cf83b4c771dac2dae08\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b\", \"lessThan\": \"5314454ea3ff6fc746eaf71b9a7ceebed52888fa\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/ocfs2/alloc.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.10\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.10\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"4.9.288\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"4.9.*\"}, {\"status\": \"unaffected\", \"version\": \"4.14.253\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"4.14.*\"}, {\"status\": \"unaffected\", \"version\": \"4.19.214\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"4.19.*\"}, {\"status\": \"unaffected\", \"version\": \"5.4.156\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.4.*\"}, {\"status\": \"unaffected\", \"version\": \"5.10.76\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.10.*\"}, {\"status\": \"unaffected\", \"version\": \"5.14.15\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.14.*\"}, {\"status\": \"unaffected\", \"version\": \"5.15\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/ocfs2/alloc.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/560edd14de2bf9dbc0129681eeb4d5ef87cc105f\"}, {\"url\": \"https://git.kernel.org/stable/c/8e6bfb4f70168ddfd32fb6dc028ad52faaf1f32e\"}, {\"url\": \"https://git.kernel.org/stable/c/a3a089c241cd49b33a8cdd7fcb37cc87a086912a\"}, {\"url\": \"https://git.kernel.org/stable/c/b05caf023b14cbed9223bb5b48ecc7bffe38f632\"}, {\"url\": \"https://git.kernel.org/stable/c/f1b98569e81c37d7e0deada7172f8f60860c1360\"}, {\"url\": \"https://git.kernel.org/stable/c/fa9b6b6c953e3f6441ed6cf83b4c771dac2dae08\"}, {\"url\": \"https://git.kernel.org/stable/c/5314454ea3ff6fc746eaf71b9a7ceebed52888fa\"}], \"x_generator\": {\"engine\": \"bippy-5f407fcff5a0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nocfs2: fix data corruption after conversion from inline format\\n\\nCommit 6dbf7bb55598 (\\\"fs: Don't invalidate page buffers in\\nblock_write_full_page()\\\") uncovered a latent bug in ocfs2 conversion\\nfrom inline inode format to a normal inode format.\\n\\nThe code in ocfs2_convert_inline_data_to_extents() attempts to zero out\\nthe whole cluster allocated for file data by grabbing, zeroing, and\\ndirtying all pages covering this cluster.  However these pages are\\nbeyond i_size, thus writeback code generally ignores these dirty pages\\nand no blocks were ever actually zeroed on the disk.\\n\\nThis oversight was fixed by commit 693c241a5f6a (\\\"ocfs2: No need to zero\\npages past i_size.\\\") for standard ocfs2 write path, inline conversion\\npath was apparently forgotten; the commit log also has a reasoning why\\nthe zeroing actually is not needed.\\n\\nAfter commit 6dbf7bb55598, things became worse as writeback code stopped\\ninvalidating buffers on pages beyond i_size and thus these pages end up\\nwith clean PageDirty bit but with buffers attached to these pages being\\nstill dirty.  So when a file is converted from inline format, then\\nwriteback triggers, and then the file is grown so that these pages\\nbecome valid, the invalid dirtiness state is preserved,\\nmark_buffer_dirty() does nothing on these pages (buffers are already\\ndirty) but page is never written back because it is clean.  So data\\nwritten to these pages is lost once pages are reclaimed.\\n\\nSimple reproducer for the problem is:\\n\\n  xfs_io -f -c \\\"pwrite 0 2000\\\" -c \\\"pwrite 2000 2000\\\" -c \\\"fsync\\\" \\\\\\n    -c \\\"pwrite 4000 2000\\\" ocfs2_file\\n\\nAfter unmounting and mounting the fs again, you can observe that end of\\n'ocfs2_file' has lost its contents.\\n\\nFix the problem by not doing the pointless zeroing during conversion\\nfrom inline format similarly as in the standard write path.\\n\\n[akpm@linux-foundation.org: fix whitespace, per Joseph]\"}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2024-12-19T07:42:49.842Z\"}}}",
         cveMetadata: "{\"cveId\": \"CVE-2021-47460\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-12-19T07:42:49.842Z\", \"dateReserved\": \"2024-05-22T06:20:56.197Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-05-22T06:23:21.724Z\", \"assignerShortName\": \"Linux\"}",
         dataType: "CVE_RECORD",
         dataVersion: "5.1",
      },
   },
}


Log in or create an account to share your comment.

Security Advisory comment format.

This schema specifies the format of a comment related to a security advisory.

UUIDv4 of the comment
UUIDv4 of the Vulnerability-Lookup instance
When the comment was created originally
When the comment was last updated
Title of the comment
Description of the comment
The identifier of the vulnerability (CVE ID, GHSA-ID, PYSEC ID, etc.).



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.