cve-2023-52741
Vulnerability from cvelistv5
Published
2024-05-21 15:23
Modified
2024-11-04 14:51
Severity ?
Summary
cifs: Fix use-after-free in rdata->read_into_pages()
Impacted products
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2023-52741",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-05-28T15:46:03.268177Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:24:17.508Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T23:11:35.667Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/2b693fe3f760c87fd9768e759f6297f743a1b3b0"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/d1fba1e096ffc7ec11df863a97c50203c47315b9"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/3684a2f6affa1ca52a5d4a12f04d0652efdee65e"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/aa5465aeca3c66fecdf7efcf554aed79b4c4b211"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/cifs/file.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "2b693fe3f760",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "d1fba1e096ff",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "3684a2f6affa",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "aa5465aeca3c",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/cifs/file.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.168",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.94",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.12",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncifs: Fix use-after-free in rdata-\u003eread_into_pages()\n\nWhen the network status is unstable, use-after-free may occur when\nread data from the server.\n\n  BUG: KASAN: use-after-free in readpages_fill_pages+0x14c/0x7e0\n\n  Call Trace:\n   \u003cTASK\u003e\n   dump_stack_lvl+0x38/0x4c\n   print_report+0x16f/0x4a6\n   kasan_report+0xb7/0x130\n   readpages_fill_pages+0x14c/0x7e0\n   cifs_readv_receive+0x46d/0xa40\n   cifs_demultiplex_thread+0x121c/0x1490\n   kthread+0x16b/0x1a0\n   ret_from_fork+0x2c/0x50\n   \u003c/TASK\u003e\n\n  Allocated by task 2535:\n   kasan_save_stack+0x22/0x50\n   kasan_set_track+0x25/0x30\n   __kasan_kmalloc+0x82/0x90\n   cifs_readdata_direct_alloc+0x2c/0x110\n   cifs_readdata_alloc+0x2d/0x60\n   cifs_readahead+0x393/0xfe0\n   read_pages+0x12f/0x470\n   page_cache_ra_unbounded+0x1b1/0x240\n   filemap_get_pages+0x1c8/0x9a0\n   filemap_read+0x1c0/0x540\n   cifs_strict_readv+0x21b/0x240\n   vfs_read+0x395/0x4b0\n   ksys_read+0xb8/0x150\n   do_syscall_64+0x3f/0x90\n   entry_SYSCALL_64_after_hwframe+0x72/0xdc\n\n  Freed by task 79:\n   kasan_save_stack+0x22/0x50\n   kasan_set_track+0x25/0x30\n   kasan_save_free_info+0x2e/0x50\n   __kasan_slab_free+0x10e/0x1a0\n   __kmem_cache_free+0x7a/0x1a0\n   cifs_readdata_release+0x49/0x60\n   process_one_work+0x46c/0x760\n   worker_thread+0x2a4/0x6f0\n   kthread+0x16b/0x1a0\n   ret_from_fork+0x2c/0x50\n\n  Last potentially related work creation:\n   kasan_save_stack+0x22/0x50\n   __kasan_record_aux_stack+0x95/0xb0\n   insert_work+0x2b/0x130\n   __queue_work+0x1fe/0x660\n   queue_work_on+0x4b/0x60\n   smb2_readv_callback+0x396/0x800\n   cifs_abort_connection+0x474/0x6a0\n   cifs_reconnect+0x5cb/0xa50\n   cifs_readv_from_socket.cold+0x22/0x6c\n   cifs_read_page_from_socket+0xc1/0x100\n   readpages_fill_pages.cold+0x2f/0x46\n   cifs_readv_receive+0x46d/0xa40\n   cifs_demultiplex_thread+0x121c/0x1490\n   kthread+0x16b/0x1a0\n   ret_from_fork+0x2c/0x50\n\nThe following function calls will cause UAF of the rdata pointer.\n\nreadpages_fill_pages\n cifs_read_page_from_socket\n  cifs_readv_from_socket\n   cifs_reconnect\n    __cifs_reconnect\n     cifs_abort_connection\n      mid-\u003ecallback() --\u003e smb2_readv_callback\n       queue_work(\u0026rdata-\u003ework)  # if the worker completes first,\n                                 # the rdata is freed\n          cifs_readv_complete\n            kref_put\n              cifs_readdata_release\n                kfree(rdata)\n return rdata-\u003e...               # UAF in readpages_fill_pages()\n\nSimilarly, this problem also occurs in the uncache_fill_pages().\n\nFix this by adjusts the order of condition judgment in the return\nstatement."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-04T14:51:48.728Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/2b693fe3f760c87fd9768e759f6297f743a1b3b0"
        },
        {
          "url": "https://git.kernel.org/stable/c/d1fba1e096ffc7ec11df863a97c50203c47315b9"
        },
        {
          "url": "https://git.kernel.org/stable/c/3684a2f6affa1ca52a5d4a12f04d0652efdee65e"
        },
        {
          "url": "https://git.kernel.org/stable/c/aa5465aeca3c66fecdf7efcf554aed79b4c4b211"
        }
      ],
      "title": "cifs: Fix use-after-free in rdata-\u003eread_into_pages()",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-52741",
    "datePublished": "2024-05-21T15:23:03.867Z",
    "dateReserved": "2024-05-21T15:19:24.233Z",
    "dateUpdated": "2024-11-04T14:51:48.728Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-52741\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-21T16:15:14.000\",\"lastModified\":\"2024-05-21T16:53:56.550\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncifs: Fix use-after-free in rdata-\u003eread_into_pages()\\n\\nWhen the network status is unstable, use-after-free may occur when\\nread data from the server.\\n\\n  BUG: KASAN: use-after-free in readpages_fill_pages+0x14c/0x7e0\\n\\n  Call Trace:\\n   \u003cTASK\u003e\\n   dump_stack_lvl+0x38/0x4c\\n   print_report+0x16f/0x4a6\\n   kasan_report+0xb7/0x130\\n   readpages_fill_pages+0x14c/0x7e0\\n   cifs_readv_receive+0x46d/0xa40\\n   cifs_demultiplex_thread+0x121c/0x1490\\n   kthread+0x16b/0x1a0\\n   ret_from_fork+0x2c/0x50\\n   \u003c/TASK\u003e\\n\\n  Allocated by task 2535:\\n   kasan_save_stack+0x22/0x50\\n   kasan_set_track+0x25/0x30\\n   __kasan_kmalloc+0x82/0x90\\n   cifs_readdata_direct_alloc+0x2c/0x110\\n   cifs_readdata_alloc+0x2d/0x60\\n   cifs_readahead+0x393/0xfe0\\n   read_pages+0x12f/0x470\\n   page_cache_ra_unbounded+0x1b1/0x240\\n   filemap_get_pages+0x1c8/0x9a0\\n   filemap_read+0x1c0/0x540\\n   cifs_strict_readv+0x21b/0x240\\n   vfs_read+0x395/0x4b0\\n   ksys_read+0xb8/0x150\\n   do_syscall_64+0x3f/0x90\\n   entry_SYSCALL_64_after_hwframe+0x72/0xdc\\n\\n  Freed by task 79:\\n   kasan_save_stack+0x22/0x50\\n   kasan_set_track+0x25/0x30\\n   kasan_save_free_info+0x2e/0x50\\n   __kasan_slab_free+0x10e/0x1a0\\n   __kmem_cache_free+0x7a/0x1a0\\n   cifs_readdata_release+0x49/0x60\\n   process_one_work+0x46c/0x760\\n   worker_thread+0x2a4/0x6f0\\n   kthread+0x16b/0x1a0\\n   ret_from_fork+0x2c/0x50\\n\\n  Last potentially related work creation:\\n   kasan_save_stack+0x22/0x50\\n   __kasan_record_aux_stack+0x95/0xb0\\n   insert_work+0x2b/0x130\\n   __queue_work+0x1fe/0x660\\n   queue_work_on+0x4b/0x60\\n   smb2_readv_callback+0x396/0x800\\n   cifs_abort_connection+0x474/0x6a0\\n   cifs_reconnect+0x5cb/0xa50\\n   cifs_readv_from_socket.cold+0x22/0x6c\\n   cifs_read_page_from_socket+0xc1/0x100\\n   readpages_fill_pages.cold+0x2f/0x46\\n   cifs_readv_receive+0x46d/0xa40\\n   cifs_demultiplex_thread+0x121c/0x1490\\n   kthread+0x16b/0x1a0\\n   ret_from_fork+0x2c/0x50\\n\\nThe following function calls will cause UAF of the rdata pointer.\\n\\nreadpages_fill_pages\\n cifs_read_page_from_socket\\n  cifs_readv_from_socket\\n   cifs_reconnect\\n    __cifs_reconnect\\n     cifs_abort_connection\\n      mid-\u003ecallback() --\u003e smb2_readv_callback\\n       queue_work(\u0026rdata-\u003ework)  # if the worker completes first,\\n                                 # the rdata is freed\\n          cifs_readv_complete\\n            kref_put\\n              cifs_readdata_release\\n                kfree(rdata)\\n return rdata-\u003e...               # UAF in readpages_fill_pages()\\n\\nSimilarly, this problem also occurs in the uncache_fill_pages().\\n\\nFix this by adjusts the order of condition judgment in the return\\nstatement.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: cifs: corrige el use after free en rdata-\u0026gt;read_into_pages(). Cuando el estado de la red es inestable, puede ocurrir el use after free al leer datos del servidor. BUG: KASAN: use after free en readpages_fill_pages+0x14c/0x7e0 Seguimiento de llamadas:  dump_stack_lvl+0x38/0x4c print_report+0x16f/0x4a6 kasan_report+0xb7/0x130 readpages_fill_pages+0x14c/0x7e0 cifs_readv_receive+0x 46d/0xa40 cifs_demultiplex_thread+0x121c/ 0x1490 kthread+0x16b/0x1a0 ret_from_fork+0x2c/0x50  Asignado por tarea 2535: kasan_save_stack+0x22/0x50 kasan_set_track+0x25/0x30 __kasan_kmalloc+0x82/0x90 cifs_readdata_direct_alloc+0x2c /0x110 cifs_readdata_alloc+0x2d/0x60 cifs_readahead+0x393/0xfe0 read_pages+0x12f/0x470 page_cache_ra_unbounded+0x1b1/0x240 filemap_get_pages+0x1c8/0x9a0 filemap_read+0x1c0/0x540 cifs_strict_readv+0x21b/0x240 vfs_read+0x395/0x4b0 ksys_read+0xb8/0 x150 do_syscall_64+0x3f/0x90 Entry_SYSCALL_64_after_hwframe+0x72/0xdc Liberado por la tarea 79: kasan_save_stack+0x22/0x50 kasan_set_track+0x25/0x30 kasan_save_free_info+0x2e/0x50 __kasan_slab_free+0x10e/0x1a0 __kmem_cache_free+0x7a/0x1a0 cifs_readdata_release+0x49/0x60 Process_one_work+0x46c /0x760 worker_thread+0x2a4/0x6f0 kthread+0x16b/0x1a0 ret_from_fork+0x2c/0x50 \u00daltima creaci\u00f3n de trabajo potencialmente relacionado: kasan_save_stack+0x22/0x50 __kasan_record_aux_stack+0x95/0xb0 insert_work+0x2b/0x130 __queue_work+0x1fe/0x660 queue_work_on+0x4b/0x60 smb2_readv_callback+0x396/0x800 ion+0x474/0x6a0 cifs_reconnect+0x5cb/0xa50 cifs_readv_from_socket.cold+ 0x22/0x6c cifs_read_page_from_socket+0xc1/0x100 readpages_fill_pages.cold+0x2f/0x46 cifs_readv_receive+0x46d/0xa40 cifs_demultiplex_thread+0x121c/0x1490 kthread+0x16b/0x1a0 x2c/0x50 Las siguientes llamadas a funciones causar\u00e1n UAF del puntero rdata. readpages_fill_pages cifs_read_page_from_socket cifs_readv_from_socket cifs_reconnect __cifs_reconnect cifs_abort_connection mid-\u0026gt;callback() --\u0026gt; smb2_readv_callback queue_work(\u0026amp;rdata-\u0026gt;work) # si el trabajador completa primero, # los rdata se liberan cifs_readv_complete kref_put cifs_readdata_release kfree( rdata) devolver rdata-\u0026gt;... # UAF en readpages_fill_pages() De manera similar, este problema tambi\u00e9n ocurre en uncache_fill_pages(). Solucione este problema ajustando el orden del juicio de condici\u00f3n en la declaraci\u00f3n de devoluci\u00f3n.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/2b693fe3f760c87fd9768e759f6297f743a1b3b0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/3684a2f6affa1ca52a5d4a12f04d0652efdee65e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/aa5465aeca3c66fecdf7efcf554aed79b4c4b211\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d1fba1e096ffc7ec11df863a97c50203c47315b9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...

Loading...
  • 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.