Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eX2T3-0000Nv-Ui for pgsql-bugs@arkaria.postgresql.org; Thu, 04 Jan 2018 10:09:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eX2T3-00066p-51 for pgsql-bugs@arkaria.postgresql.org; Thu, 04 Jan 2018 10:09:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eX2T2-00066f-Ou for pgsql-bugs@lists.postgresql.org; Thu, 04 Jan 2018 10:09:45 +0000 Received: from forward4p.cmail.yandex.net ([77.88.31.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eX2Sv-0004dc-3p for pgsql-bugs@postgresql.org; Thu, 04 Jan 2018 10:09:43 +0000 Received: from mxback9o.mail.yandex.net (mxback9o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::23]) by forward4p.cmail.yandex.net (Yandex) with ESMTP id 4014E20D83; Thu, 4 Jan 2018 13:09:32 +0300 (MSK) Received: from web58o.yandex.ru (web58o.yandex.ru [2a02:6b8:0:1a2d::5:238]) by mxback9o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id km0XDQvOr6-9VOWGbnv; Thu, 04 Jan 2018 13:09:31 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1515060571; bh=aFCjl3SG16JOfOMVYYNsti74KF2XNKuWwaCDkGiaVSI=; h=From:To:In-Reply-To:References:Subject:Message-Id:Date; b=aefstGMTzXUW2xY8KmBIqElECWqXBXt6ekLkNdcC80TOV+wwSIWBBDueJKQ+PCu1m XHiOZOm9fW4+B38MT3agEv9HiUhMhNZ8Quza9DKqj0Hgnw2KE4EhDxuDZT6BGb/wMk 4AkW9JIeEZWLaBWKzmjA7wLawMLbCRe8vtTXZ+/4= Authentication-Results: mxback9o.mail.yandex.net; dkim=pass header.i=@zsrv.org Received: by web58o.yandex.ru with HTTP; Thu, 04 Jan 2018 13:09:31 +0300 From: Sergei Kornilov To: Thu Luu , "pgsql-bugs@postgresql.org" In-Reply-To: References: <20180104041919.10227.4524@wrigleys.postgresql.org> <20180104042251.d2yqmgbnlkf67nny@alap3.anarazel.de> Subject: Re: BUG #14998: XXS vulnerabilities in PostgreSQL 'utf8 4-byte truncation' MIME-Version: 1.0 Message-Id: <1246531515060571@web58o.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 04 Jan 2018 13:09:31 +0300 Content-Transfer-Encoding: 7bit Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi! I do not understand what your problem is. UTF8 character may be 4 bytes long by standart. Postgresql can store this characters. Mysql - for history reasons - treat utf8 as at most 3 byte characters and is not fully unicode compatible. In mysql 5.5 was added utf8mb4 charset which is full unicode compatible and can store 4 byte characters ( https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html ). Discarding or correct storing 4-byte symbols is not vulnerabilities, just historical error in mysql. PS: given link is broken due outdated https cert.