[Bug 1969000] Re: [SRU] mon crashes when improper json is passed to rados

nikhil kshirsagar 1969000 at bugs.launchpad.net
Thu Jun 16 06:16:40 UTC 2022


** Description changed:

- [Impact] 
- If improper json data is passed to rados, it can end up crashing the mon. 
+ [Impact]
+ If improper json data is passed to rados, it can end up crashing the mon.
  
  [Test Plan]
- The malformed request looks like -
+ A manual run of curl with the malformed request like this results in the crash -
  
  curl -k -H "Authorization: Basic $TOKEN"
  "https://juju-3b3d82-10-lxd-0:8003/request" -X POST -d '{"prefix":"auth
  add","entity":"client.testuser02","caps":"mon '\''allow r'\'' osd
  '\''allow rw pool=testpool01'\''"}'
  
  The request status shows it is still in the queue.
  
  [
-     {
-         "failed": [],
-         "finished": [],
-         "has_failed": false,
-         "id": "140576245092648",
-         "is_finished": false,
-         "is_waiting": false,
-         "running": [
-             {
-                 "command": "auth add entity=client.testuser02 caps=mon 'allow r' osd 'allow rw pool=testpool01'",
-                 "outb": "",
-                 "outs": "" 
-             }
-         ],
-         "state": "pending",
-         "waiting": []
-     }
+     {
+         "failed": [],
+         "finished": [],
+         "has_failed": false,
+         "id": "140576245092648",
+         "is_finished": false,
+         "is_waiting": false,
+         "running": [
+             {
+                 "command": "auth add entity=client.testuser02 caps=mon 'allow r' osd 'allow rw pool=testpool01'",
+                 "outb": "",
+                 "outs": ""
+             }
+         ],
+         "state": "pending",
+         "waiting": []
+     }
  ]
  
  [Where problems could occur]
  No problems foreseen because the exception is hit only in case of malformed json data, and not otherwise, and it is a desirable thing to catch and handle it instead of allowing process termination due to uncaught exception.
  
  [Other Info]
  Reported upstream at https://tracker.ceph.com/issues/54558 (including reproducer, and fix testing details) and fixed through https://github.com/ceph/ceph/pull/45547
  
  PR for Octopus is at https://github.com/ceph/ceph/pull/45891

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

Title:
  [SRU] mon crashes when improper json is passed to rados

Status in Ubuntu Cloud Archive:
  New
Status in Ubuntu Cloud Archive ussuri series:
  New
Status in ceph package in Ubuntu:
  New
Status in ceph source package in Focal:
  New

Bug description:
  [Impact]
  If improper json data is passed to rados, it can end up crashing the mon.

  [Test Plan]
  A manual run of curl with the malformed request like this results in the crash -

  curl -k -H "Authorization: Basic $TOKEN"
  "https://juju-3b3d82-10-lxd-0:8003/request" -X POST -d
  '{"prefix":"auth add","entity":"client.testuser02","caps":"mon
  '\''allow r'\'' osd '\''allow rw pool=testpool01'\''"}'

  The request status shows it is still in the queue.

  [
      {
          "failed": [],
          "finished": [],
          "has_failed": false,
          "id": "140576245092648",
          "is_finished": false,
          "is_waiting": false,
          "running": [
              {
                  "command": "auth add entity=client.testuser02 caps=mon 'allow r' osd 'allow rw pool=testpool01'",
                  "outb": "",
                  "outs": ""
              }
          ],
          "state": "pending",
          "waiting": []
      }
  ]

  [Where problems could occur]
  No problems foreseen because the exception is hit only in case of malformed json data, and not otherwise, and it is a desirable thing to catch and handle it instead of allowing process termination due to uncaught exception.

  [Other Info]
  Reported upstream at https://tracker.ceph.com/issues/54558 (including reproducer, and fix testing details) and fixed through https://github.com/ceph/ceph/pull/45547

  PR for Octopus is at https://github.com/ceph/ceph/pull/45891

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1969000/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list