GHSA-78V2-VGFV-PF7C

Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-11-30 15:32
VLAI
Details

In the Linux kernel, the following vulnerability has been resolved:

ocfs2: fix possible deadlock between nfs_sync_rwlock and fs_reclaim

syzbot detected a circular locking dependency on &osb->nfs_sync_rwlock:

   CPU0                    CPU1
   ----                    ----

lock(fs_reclaim); lock(&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]); lock(fs_reclaim); rlock(&osb->nfs_sync_rwlock);

*** DEADLOCK ***

Chain exists of: &osb->nfs_sync_rwlock --> &ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE] --> fs_reclaim

CPU0 is kswapd. The dentry shrinker runs under fs_reclaim and reaches ocfs2_delete_inode() through ->evict_inode():

kswapd balance_pgdat shrink_node shrink_slab super_cache_scan prune_dcache_sb shrink_dentry_list dentry_kill ocfs2_dentry_iput evict ocfs2_evict_inode ocfs2_delete_inode ocfs2_nfs_sync_lock down_read(&osb->nfs_sync_rwlock) //C0: grabbing

CPU1 is a task deleting an inode. It takes nfs_sync_rwlock first, then the orphan dir and inode alloc system inode i_rwsems, and allocates the metadata reservation with GFP_KERNEL while holding them:

evict ocfs2_evict_inode ocfs2_delete_inode + ocfs2_nfs_sync_lock | down_read(&osb->nfs_sync_rwlock) //C1: hold + ocfs2_wipe_inode + inode_lock(orphan_dir_inode) //C1: hold + ocfs2_truncate_for_delete | ocfs2_commit_truncate | ocfs2_remove_btree_range | ocfs2_reserve_blocks_for_rec_trunc | ocfs2_reserve_new_metadata_blocks | kzalloc_obj() //C1: grabbing | // GFP_KERNEL -> might_alloc -> fs_reclaim_acquire + ocfs2_remove_inode inode_lock(inode_alloc_inode)

jbd2 pins allocations to GFP_NOFS for the lifetime of a transaction handle, but these reservations are made before ocfs2_start_trans(), so fs_reclaim is acquired with ocfs2 locks still held and the cycle closes.

The same cycle is reachable from ocfs2_get_dentry() and ocfs2_get_parent(), which hold nfs_sync_rwlock for write across ocfs2_test_inode_bit() and ocfs2_iget().

This is more than a lockdep artifact. A GFP_KERNEL allocation under the orphan dir i_rwsem enters direct reclaim, which runs the shrinkers, which can evict another ocfs2 inode and re-enter ocfs2_wipe_inode() on the same task; the second inode_lock() on the singleton orphan dir inode then self-deadlocks, since i_rwsem is not recursive.

Establish a GFP_NOFS allocation context for the whole nfs_sync_rwlock critical section so that nothing holding it can recurse into filesystem reclaim. Do it in ocfs2_nfs_sync_lock()/ocfs2_nfs_sync_unlock() rather than at the call sites, so that future callers cannot forget it.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-139390"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T14:19:06Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: fix possible deadlock between nfs_sync_rwlock and fs_reclaim\n\nsyzbot detected a circular locking dependency on \u0026osb-\u003enfs_sync_rwlock:\n\n       CPU0                    CPU1\n       ----                    ----\n  lock(fs_reclaim);\n                               lock(\u0026ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]);\n                               lock(fs_reclaim);\n  rlock(\u0026osb-\u003enfs_sync_rwlock);\n\n *** DEADLOCK ***\n\nChain exists of:\n  \u0026osb-\u003enfs_sync_rwlock --\u003e \u0026ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE] --\u003e fs_reclaim\n\nCPU0 is kswapd.  The dentry shrinker runs under fs_reclaim and reaches\nocfs2_delete_inode() through -\u003eevict_inode():\n\nkswapd\n balance_pgdat\n  shrink_node\n   shrink_slab\n    super_cache_scan\n     prune_dcache_sb\n      shrink_dentry_list\n       dentry_kill\n        ocfs2_dentry_iput\n         evict\n          ocfs2_evict_inode\n           ocfs2_delete_inode\n            ocfs2_nfs_sync_lock\n             down_read(\u0026osb-\u003enfs_sync_rwlock)      //C0: grabbing\n\nCPU1 is a task deleting an inode.  It takes nfs_sync_rwlock first, then\nthe orphan dir and inode alloc system inode i_rwsems, and allocates the\nmetadata reservation with GFP_KERNEL while holding them:\n\nevict\n ocfs2_evict_inode\n  ocfs2_delete_inode\n  + ocfs2_nfs_sync_lock\n  |  down_read(\u0026osb-\u003enfs_sync_rwlock)              //C1: hold\n  + ocfs2_wipe_inode\n     + inode_lock(orphan_dir_inode)                //C1: hold\n     + ocfs2_truncate_for_delete\n     |  ocfs2_commit_truncate\n     |   ocfs2_remove_btree_range\n     |    ocfs2_reserve_blocks_for_rec_trunc\n     |     ocfs2_reserve_new_metadata_blocks\n     |      kzalloc_obj()                          //C1: grabbing\n     |      // GFP_KERNEL -\u003e might_alloc -\u003e fs_reclaim_acquire\n     + ocfs2_remove_inode\n        inode_lock(inode_alloc_inode)\n\njbd2 pins allocations to GFP_NOFS for the lifetime of a transaction\nhandle, but these reservations are made before ocfs2_start_trans(), so\nfs_reclaim is acquired with ocfs2 locks still held and the cycle closes.\n\nThe same cycle is reachable from ocfs2_get_dentry() and\nocfs2_get_parent(), which hold nfs_sync_rwlock for write across\nocfs2_test_inode_bit() and ocfs2_iget().\n\nThis is more than a lockdep artifact.  A GFP_KERNEL allocation under the\norphan dir i_rwsem enters direct reclaim, which runs the shrinkers, which\ncan evict another ocfs2 inode and re-enter ocfs2_wipe_inode() on the same\ntask; the second inode_lock() on the singleton orphan dir inode then\nself-deadlocks, since i_rwsem is not recursive.\n\nEstablish a GFP_NOFS allocation context for the whole nfs_sync_rwlock\ncritical section so that nothing holding it can recurse into filesystem\nreclaim.  Do it in ocfs2_nfs_sync_lock()/ocfs2_nfs_sync_unlock() rather\nthan at the call sites, so that future callers cannot forget it.",
  "id": "GHSA-78v2-vgfv-pf7c",
  "modified": "2026-11-30T15:32:29Z",
  "published": "2026-11-30T15:32:29Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139390"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/054916b3dc1f27b24d1c5af6cc02f46d877e4da0"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/169bc4d16a8efa7852b101fdaa4c028505cd6750"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/503227c6de8e577f3276189257b44aafe09c25a2"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/551d89f8240c18ab1ae14334f2216393023b1209"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/69dd04f8b738455c2b5ac482004459fffb805af4"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/7b40fe4a02b4375f86fc468f3a9bef414ff578ed"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/bb38748e1c1c75b6c21f0a1378310f932fccee72"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/cc044ce077f43a77fcb0d3bb8333c4e200aa50b8"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.