Bug #2439
closedceph-client: auth: handle null verify_authorizer_reply method
0%
Description
I added code to the client messenger avoid dereferencing a null
auth_client->ops or auth_client->ops->(method) pointer.
When it came to the verify_authorizer_reply method, I wasn't sure
whether to have it indicate success or failure if it was used but
no method pointer was defined.
Sage envisioned a scenario where something like this might happen:
I think this sort of situation would only come up if we successfully
authenticated with the mon with some auth protocol, and start
communicating with daemons... and then later when we are reconnecting
to another mon we fail to negotiate any protocol. For example, mon
config change, or differing config between monitors. That would change
things out from from underneath the other sessions and lead to various
badness.
(This was in the function verify_authorizer_reply(), in net/ceph/osd_client.c.)
Anyway, the purpose of this bug is to record that we should look at this
at some point and address the issue.
Updated by Ilya Dryomov over 7 years ago
- Status changed from New to In Progress
- Assignee set to Ilya Dryomov
Updated by Ilya Dryomov over 7 years ago
- Category set to libceph
- Status changed from In Progress to Resolved
All the plumbing for verify_authorizer_reply() is there, but it wasn't being called by the messenger: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5c056fdc5b474329037f2aa18401bd73033e0ce0
To make auth_none work, ceph_auth_verify_authorizer_reply() should return success when ->verify_authorizer_reply() isn't defined - although I would have defined a static verify_authorizer_reply() in auth_none.c for this.