Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1258641 - Malformed JSON can cause API process crash
Malformed JSON can cause API process crash
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
3.0.0
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Jordan Liggitt
Ma xiaoqiang
:
Depends On:
Blocks: CVE-2015-5250
  Show dependency treegraph
 
Reported: 2015-08-31 17:18 EDT by Jordan Liggitt
Modified: 2016-07-03 20:45 EDT (History)
6 users (show)

See Also:
Fixed In Version: openshift-3.0.1.0-1.git.529.dcab62c.el7ose
Doc Type: Bug Fix
Doc Text:
Cause: Improper error handling in the API server. Consequence: Malformed JSON payloads could cause the process to crash. Fix: Properly handle failure cases. Result: Admins must update to the latest RPMs to received this fix. Technically only the master RPM needs to be updated.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-03 14:48:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1736 normal SHIPPED_LIVE Moderate: openshift security update 2015-09-03 18:48:23 EDT

  None (edit)
Description Jordan Liggitt 2015-08-31 17:18:28 EDT
Description of problem:
https://github.com/openshift/origin/issues/4374

Applies to 3.0.1

Env
---
~~~
# openshift version
openshift v1.0.5-27-g2cc96dc
kubernetes v1.1.0-alpha.0-1605-g44c91b1

# go version
go version go1.4.2 linux/amd64
~~~

Issue:
---
- We can kill OpenShift process by sending request with invalid json file.
- Please see following steps.

Reproduce steps
---

step-1. Start openshift origin with standalone mode, and create route and docker-registry. (Followed with [here](https://github.com/nak3/openshift-local-setup))

step-2. Send invalid json file by my [origin-killer.json](https://gist.githubusercontent.com/nak3/23de3850fd3abf5ed038/raw/eba398a3e778459ca21ff8f60371e708566f7950/origin-killer.json
)
~~~
[root@localhost ~]# oc create -f https://gist.githubusercontent.com/nak3/23de3850fd3abf5ed038/raw/eba398a3e778459ca21ff8f60371e708566f7950/origin-killer.json
imagestream "sti-python" created
Unable to connect to the server: EOF
The connection to the server 192.168.122.27:8443 was refused - did you specify the right host or port?
The connection to the server 192.168.122.27:8443 was refused - did you specify the right host or port?
~~~

step-3. You can see go panic and stop the OpenShift process

The log is here: https://kenjiro.fedorapeople.org/misc/logs/origin.log (Too long, please check from the bottom.)






Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Jordan Liggitt 2015-08-31 17:18:51 EDT
Fixed in origin in https://github.com/openshift/origin/pull/4416
Comment 2 Jordan Liggitt 2015-08-31 17:20:12 EDT
This is a candidate for backporting to 3.0.1
Comment 7 Ma xiaoqiang 2015-09-01 21:59:05 EDT
QE check on release version and latest puddle [2015-09-01.1]

scenario 1: check on release version
1. start openshift
#openshift start --loglevel=4 --hostname=openshift-123.lab.eng.nay.redhat.com
2. create app from invalid json
# oc create -f https://gist.githubusercontent.com/nak3/23de3850fd3abf5ed038/raw/eba398a3e778459ca21ff8f60371e708566f7950/origin-killer.json
imagestreams/sti-python
deploymentconfigs/sti-python
services/sti-python
The BuildConfig "sti-python" is invalid:
* triggers[2].type: invalid value 'ConfigChange': invalid trigger type
* spec.strategy.stiStrategy: required value

3. check the process
the openshift process is running


scenario 2: check on latest puddle [2015-09-01.1]
1, create app from invalid json
$  oc create -f https://gist.githubusercontent.com/nak3/23de3850fd3abf5ed038/raw/eba398a3e778459ca21ff8f60371e708566f7950/origin-killer.json
imagestreams/sti-python
deploymentconfigs/sti-python
services/sti-python
The BuildConfig "sti-python" is invalid:
* triggers[2].type: invalid value 'ConfigChange': invalid trigger type
* spec.strategy.stiStrategy: required value

2. create an app from template
 oc new-app nodejs-example

The service works fine. 
QE can not reproduced this issue on OSE.
Comment 9 errata-xmlrpc 2015-09-03 14:48:34 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1736

Note You need to log in before you can comment on or make changes to this bug.