Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C2ACD200D45 for ; Thu, 23 Nov 2017 23:06:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C11DB160BED; Thu, 23 Nov 2017 22:06:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 18CB3160BFE for ; Thu, 23 Nov 2017 23:06:04 +0100 (CET) Received: (qmail 78409 invoked by uid 500); 23 Nov 2017 22:06:04 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 78400 invoked by uid 500); 23 Nov 2017 22:06:04 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 78397 invoked by uid 99); 23 Nov 2017 22:06:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Nov 2017 22:06:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 43FBD180791 for ; Thu, 23 Nov 2017 22:06:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id AkKYSp5HCY_0 for ; Thu, 23 Nov 2017 22:06:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 65C0E5F3D1 for ; Thu, 23 Nov 2017 22:06:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id B0812E0F80 for ; Thu, 23 Nov 2017 22:06:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3C85023F1D for ; Thu, 23 Nov 2017 22:06:00 +0000 (UTC) Date: Thu, 23 Nov 2017 22:06:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-9593) User data check is inconsistent with python MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 23 Nov 2017 22:06:06 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9593?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16264813#comment-16264813 ]=20 ASF GitHub Bot commented on CLOUDSTACK-9593: -------------------------------------------- blueorangutan commented on issue #1760: CLOUDSTACK-9593: userdata: enforce = data is a multiple of 4 characters URL: https://github.com/apache/cloudstack/pull/1760#issuecomment-346702896 =20 =20 Packaging result: =E2=9C=94centos6 =E2=9C=94centos7 =E2=9C=94debian. JID= -1293 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org > User data check is inconsistent with python > ------------------------------------------- > > Key: CLOUDSTACK-9593 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-959= 3 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Affects Versions: 4.4.2, 4.4.3, 4.3.2, 4.5.1, 4.4.4, 4.5.2, 4.6.0, 4.6= .1, 4.6.2, 4.7.0, 4.7.1, 4.8.0, 4.9.0 > Reporter: Marc-Aur=C3=A8le Brothier > Assignee: Marc-Aur=C3=A8le Brothier > > The user data is validated through the Apache commons codec library, but = this library does not check that the length is a multiple of 4 characters. = The RFC does not require it either. But the python script in the virtual ro= uter that loads the user data does check for the possible padding presence,= requiring the string to be a multiple of 4 characters. > {code:python} > >>> import base64 > >>> base64.b64decode('foo') > Traceback (most recent call last): > File "", line 1, in > File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versi= ons/2.7/lib/python2.7/base64.py", line 78, in b64decode > raise TypeError(msg) > TypeError: Incorrect padding > >>> base64.b64decode('foo=3D') > '~\x8a' > {code} > Currently since the java check is less restrictive, the user data gets sa= ved into the database but the VR script crashes when it receives this VM us= er data. On a single VM it is not really a problem. The critical issue is w= hen a VR is restarted. The invalid pythonic base64 string makes the vmdata.= py script crashed, resulting in a VR not starting at all. -- This message was sent by Atlassian JIRA (v6.4.14#64029)