Public bug reported:

[Impact]

NFSv3 and v4 clients using a sec=krb5* mount option can run into a
situation where the GSS context expires between sending a request and
verifying its reply, causing gss_validate() to fail with
GSS_S_CONTEXT_EXPIRED. This results in an EACCES error returned from
gss_validate(), which behaves differently on Jammy vs Noble:

On Jammy 5.15 kernels, this results in an I/O error being returned.

On Noble 6.8 kernels (version 6.8.0-98 and later), because commit
fadc0f3bb2de ("sunrpc: don't immediately retransmit on seqno miss") was
backported without 9b62ef6d239e ("SUNRPC: fix handling expired GSS
context"), the client discards the reply, which results in the task
issuing the request never seeing that reply and thus hanging
indefinitely.

[Fix]

The fix exists upstream as commit 9b62ef6d239e ("SUNRPC: fix handling
expired GSS context"). The fix solves the issue by catching an error
caused by an expired auth context and in that scenario, returning
EKEYREJECTED, which triggers the caller to obtain new context and retry
instead of stalling.

This is a clean cherry pick to Noble 6.8 and Jammy 5.15.

[Test plan]

Build and boot tested.

[Where issues could occur]

This modifies the SUNRPC client implementation. Regressions could occur
in either it or users of it, including NFSv3 and v4 mounts using
Kerberos.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: Invalid

** Affects: linux (Ubuntu Jammy)
     Importance: Undecided
     Assignee: Jacob Martin (jacobmartin)
         Status: In Progress

** Affects: linux (Ubuntu Noble)
     Importance: Undecided
     Assignee: Jacob Martin (jacobmartin)
         Status: In Progress

** Also affects: linux (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: linux (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Changed in: linux (Ubuntu)
       Status: New => Invalid

** Changed in: linux (Ubuntu Jammy)
       Status: New => In Progress

** Changed in: linux (Ubuntu Noble)
     Assignee: (unassigned) => Jacob Martin (jacobmartin)

** Changed in: linux (Ubuntu Jammy)
     Assignee: (unassigned) => Jacob Martin (jacobmartin)

** Changed in: linux (Ubuntu Noble)
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2173036

Title:
  Tasks can hang forever when using NFSv4 with the sec=krb5 mount option

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2173036/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to