From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id E8CE82CC2A for ; Tue, 5 Nov 2024 03:27:37 +0100 (CET) Received: (qmail 11395 invoked by uid 550); 5 Nov 2024 02:27:31 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com x-ms-reactions: disallow Received: (qmail 19683 invoked from network); 5 Nov 2024 02:03:35 -0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WFUhKsU/VquJgBgOO9inTg4YOBOT8FhjLaF3+ystUTg6DMD1p7Oj/rG+fTYS+Na0VXbfM18lmx6MJAI1+YnajwLquhefz4GZ4i6BW/9VD0LvGw6zmc6f+oS0befqGy+3Gc8wfQkyMYr8jFh6abULew/TMhAOkyZkFOz4GKe9ae+MZy/LQu6NrJEW6o+wq++XFeYHxG4r8UXLOuV9HCabKqnPPd1Jv3LAHsnn7maQa1r/WeB7QlnSByW8AiUtd5PC6tBMVtt3A/E/cRKtiD6ffejN22VpkQl/akzAJHjfsOjP42/lQ8HYOpcgzMXp8D4ztZdy3+1ojwnfMTV/1Bv3Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gqmWMHHGZbe841vI4qZOlbZ5HbZJSNCDglKWtDpCokU=; b=pIDeP7X5adY/C2qcm8/WN6rOlqWvEMQq/6IInxnWXa2EbIUlUAcxW8+VpUv986evKMjlgYqb6dvZJ4z386ZYqdmTgyjJPk8IMYGmyFDLJ2iY9ax8NcMWYc9qMEDdeQ7Otozpauvjpyvglw3+BCM/JDu9iIcLoi02+iMawvY+VABXEFvdqXcrHroVb5x6DQ5mV7SjRJcxoyVPCnj7PnD1wAL0gn5HPc388aW4laqXPxrKRd/qMQtAIaf1XL49YgYg8gTgFa0vLVxkpYDI+CHAaR3uxXro0qXAwLeYyQcSTeqG+bHHNy6VXJBv8uARQHikVbF6ocDuMlzZmgczdSjm6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none From: "Zhao, Lihua (CN)" To: Rich Felker CC: "musl@lists.openwall.com" Thread-Topic: [musl] [PATCH] mman: correct length check in __shm_mapname Thread-Index: AQHbLx754CBd7BS0S0KaE/Z4ZrhKVbKn6u+AgAAB7jA= Date: Tue, 5 Nov 2024 02:03:21 +0000 Message-ID: References: <20241105010633.1512010-1-lihua.zhao.cn@windriver.com> <20241105014652.GE10433@brightrain.aerifal.cx> In-Reply-To: <20241105014652.GE10433@brightrain.aerifal.cx> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR11MB5795:EE_|SA1PR11MB5900:EE_ x-ms-office365-filtering-correlation-id: 31c28f82-b122-4df5-4a33-08dcfd3e065b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?PcBQfztHt1/m9YdnUNnep2NA1x0MJqVaoHzMR9ZSgwFIsCs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eaalf37gNxSvvAGSfPbrzjMQ19JFRNoxf+Lsy/y/DtO?= =?us-ascii?Q?5QEAcK1sOAki/G4l78/z/kZ36oSvclFGIDOUerWRoB6nD/66S7fEipT7CoQK?= =?us-ascii?Q?t4Vej/I3ZpaUAxjgeqQ5s8+wu7siybdgF1/OTUCC3qBVCvj2ALEuIIMHvi65?= =?us-ascii?Q?p/j6bL02or6wbCqz7EEPV9LarjNW0I4q+pNTaPQZTQPo0UscK5XhHAcOLHx3?= =?us-ascii?Q?ZOJKxFBbB8I8funlRRIK9oXReZZTM4kAfyBZ6nfJreDxJKUz3XPw5h2x15Kl?= =?us-ascii?Q?BXwyp4g/iM9kbchLc9FvT7zq1jaw766nBxLp0MJnjZT6E4aXhJIGN+mfhKja?= =?us-ascii?Q?vsowVJTOo4IPv7i352d3zPr+MB83PChkj13WZiW9ATiVtSMeebMdpVLWhm6F?= =?us-ascii?Q?2Tas91viDqqyXsMgOdeA23NdKrwY+nDNkbCdeCi9Y87TiHll8sRhyWvWUOvB?= =?us-ascii?Q?rD+4mxw=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR11MB5795.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?scjddOu1xPpIHb4MbeWAuhQPQeSz+0juJ67wMNyCznblJcS3zXTF1jaFQkQu?= =?us-ascii?Q?EEjwdEd/ucs3kPhg6chvVnng/kJ8O5ONVuP2nScHV+Hi8t0l4o2cZ+MO+LGs?= =?us-ascii?Q?42T80EuwS3zWsGm8lVhQAWki0oqwV9i8Gge8qw5LAx+minV7Pm/prmbawiP8?= =?us-ascii?Q?eMlksQkblmgO8I55OSw2WsSLwM3iBcyBgY9KBP6t+oan7fNskuH0GbFG4V2r?= =?us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xz5meOqyVMplotpZYmTOjiPTOzQQItigPyG/KFVKDKm?= =?us-ascii?Q?euxQ6t+6TsgpBXSfH8b5qN/FISEzfRZuZcUJV2IdVnUnnJKq84Lxj9Snf2JR?= =?us-ascii?Q?r2Sgrb7R1Yb4pvSJV0nbM5bL/d1NybYXCO3UfD0zfA1yt9l/jfFwY4ONWUVI?= =?us-ascii?Q?qQGkh+afYnlJo/7JLGZOS8IEhxtRynjvTy2oD445vv64ck/m9kKN8XBGU2Xu?= =?us-ascii?Q?Pg4GLECJsYtvyMjOJG8CkJSrJ2TIj31aPV5PpzTmf23mIpjz9UUqlXsmZfHR?= =?us-ascii?Q?Hsxbj88rbsjfjKTJp6/2/BC1jwrFBpA2LP80pu92O76cWhfR/RSlibeHN1Kj?= =?us-ascii?Q?b5E1H+MBrM+bzRxFprEmyN/jQi3bMfbgPQ8GI69KEJgixvGZPzfbGevBSqNr?= =?us-ascii?Q?uWChVbciZG39rhl9deEKutqNVQTBPrXlNrwWOfFEF5dziEsNCuezeG64Ho+y?= =?us-ascii?Q?tKsM2rLCikKB7ZHQZbyaBC/5UHOu2HuibpRJt27i?= Content-Type: multipart/mixed; boundary="_002_PH7PR11MB5795F548FFA02488A42934FCB3522PH7PR11MB5795namp_" MIME-Version: 1.0 X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB5795.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31c28f82-b122-4df5-4a33-08dcfd3e065b X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2024 02:03:21.6109 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ExGIuf+Q5kMyrzZ90OfcbhBnLG+1EEr3mZuwg/WX2h63ZYePP5EvAdEbdUlhVLiaWptNazvhQs63CqcmjCp6URckzXXUzIwBtcftobcsAQI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB5900 X-Authority-Analysis: v=2.4 cv=H7mJwPYi c=1 sm=1 tr=0 ts=67297cec cx=c_pps a=IYePPuTyj3qIg1BHBNk0GA==:117 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=VlfZXiiP6vEA:10 a=bRTqI5nwn0kA:10 a=hAG5_4vcAAAA:8 a=t7CeM3EgAAAA:8 a=XkRKQH6RAAAA:8 a=yj-aMKAYKbz0kkd27lYA:9 a=CjuIK1q_8ugA:10 a=HjvlwW8Kk5sJao9016IA:9 a=JMNH9X61SiQA:10 a=8Bh8Pg2EFav9IBZ9i9Tn:22 a=FdTzh2GWekK77mhwV6Dw:22 a=1gUyE30hU_ULiMxJiLUW:22 X-Proofpoint-ORIG-GUID: uDxBNOqnPwaaJ1Hkyp_mdRYO7iRROhOq X-Proofpoint-GUID: uDxBNOqnPwaaJ1Hkyp_mdRYO7iRROhOq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-11-04_22,2024-11-04_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1011 priorityscore=1501 lowpriorityscore=0 impostorscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 mlxscore=0 phishscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.21.0-2409260000 definitions=main-2411050014 Subject: RE: [musl] [PATCH] mman: correct length check in __shm_mapname --_002_PH7PR11MB5795F548FFA02488A42934FCB3522PH7PR11MB5795namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This issue is found by attached test case, it works well with glibc. sem_name[0] =3D '/'; sem_name[NAME_MAX + 1] =3D '\0'; memset(sem_name + 1, 'N', NAME_MAX); /* Create the semaphore */ sem =3D sem_open(sem_name, O_CREAT, 0777, 1); The above code will generate below string which has one '/' and 255 'N's: "/NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN= NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN= NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN= NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN" When call __shm_mapname, it firstly try to skip the first '/' character, na= me point to the first 'N' character, the p will point to the EOS, so the p-= name equal 255, the original code won't enter the ENAMETOOLONG branch. The = name string should end with EOS, and all valid characters should be less th= an or equal to 254. Thanks, Lihua -----Original Message----- From: Rich Felker =20 Sent: Tuesday, November 5, 2024 9:47 AM To: Zhao, Lihua (CN) Cc: musl@lists.openwall.com Subject: Re: [musl] [PATCH] mman: correct length check in __shm_mapname CAUTION: This email comes from a non Wind River email account! Do not click links or open attachments unless you recognize the sender and = know the content is safe. On Tue, Nov 05, 2024 at 09:06:33AM +0800, lihua.zhao.cn@windriver.com wrote= : > From: Lihua Zhao > > changed the length check from `p-name > NAME_MAX` to `p-name >=3D=20 > NAME_MAX` to correctly account for the null terminator. > > Signed-off-by: Lihua Zhao > --- > src/mman/shm_open.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mman/shm_open.c b/src/mman/shm_open.c index=20 > 79784bd3..2359f067 100644 > --- a/src/mman/shm_open.c > +++ b/src/mman/shm_open.c > @@ -15,7 +15,7 @@ char *__shm_mapname(const char *name, char *buf) > errno =3D EINVAL; > return 0; > } > - if (p-name > NAME_MAX) { > + if (p-name >=3D NAME_MAX) { > errno =3D ENAMETOOLONG; > return 0; > } > -- > 2.43.0 This doesn't look correct. Can you explain what problem you think it's solv= ing? Rich --_002_PH7PR11MB5795F548FFA02488A42934FCB3522PH7PR11MB5795namp_ Content-Type: text/plain; name="test_sem_open.c" Content-Description: test_sem_open.c Content-Disposition: attachment; filename="test_sem_open.c"; size=2366; creation-date="Tue, 05 Nov 2024 01:55:34 GMT"; modification-date="Tue, 05 Nov 2024 02:03:20 GMT" Content-Transfer-Encoding: base64 I2luY2x1ZGUgPHB0aHJlYWQuaD4NCiNpbmNsdWRlIDxzdGRhcmcuaD4NCiNpbmNsdWRlIDxzdGRp by5oPg0KI2luY2x1ZGUgPHN0ZGxpYi5oPg0KI2luY2x1ZGUgPHN0cmluZy5oPg0KI2luY2x1ZGUg PHVuaXN0ZC5oPg0KDQojaW5jbHVkZSA8c2VtYXBob3JlLmg+DQojaW5jbHVkZSA8ZXJybm8uaD4N CiNpbmNsdWRlIDxmY250bC5oPg0KDQoNCiNpZm5kZWYgVkVSQk9TRQ0KI2RlZmluZSBWRVJCT1NF IDENCiNlbmRpZg0KDQojZGVmaW5lIEZBSUxFRChzKSAgICAgICAgICAgICAgICAgICAgICAgICAg IFwNCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwNCiAgICBwcmludGYoIlRl c3QgRkFJTEVEOiAlc1xuIiwgcyk7ICAgICAgICAgICAgICAgICBcDQogICAgZXhpdCgxKTsgICAg ICAgICAgICAgICAgICAgICAgICAgXA0KfQ0KDQojZGVmaW5lIFNFTV9OQU1FICAiL3NlbV91bmxp bmtfNV8xIg0KDQojaWZkZWYgTkFNRV9NQVgNCiN1bmRlZiBOQU1FX01BWA0KI2VuZGlmDQoNCi8q KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiovDQovKioqKioqKioqKioqKioqKioqKioqKioqKioqICAgIFRl c3QgY2FzZSAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KLyoqKioqKioq KioqKioqKio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tX25hbWUsIE9fQ1JF QVQsIDA3NzcsIDEpOw0KDQogICAgICAgIGlmIChzZW0gIT0gU0VNX0ZBSUxFRCkgew0KICAgICAg ICAgICAgcmV0ID0gc2VtX3VubGluayhzZW1fbmFtZSk7DQogICAgICAgICAgICBlcnJvciA9IGVy cm5vOw0KICAgICAgICAgICAgZnJlZShzZW1fbmFtZSk7DQoNCiAgICAgICAgICAgaWYgKHJldCA9 PSAwKSB7DQogICAgICAgICAgICAgICAgRkFJTEVEDQogICAgICAgICAgICAgICAgICAgICgiVGhl IGZ1bmN0aW9uIGRpZCBub3QgcmV0dXJuIEVOQU1FVE9PTE9ORyBhcyBleHBlY3RlZCIpOw0KICAg ICAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICAgICBwcmludGYoIkVycm9yIHdhcyAlZDog JXNcbiIsIGVycm9yLA0KICAgICAgICAgICAgICAgICAgICAgICBzdHJlcnJvcihlcnJvcikpOw0K ICAgICAgICAgICAgICAgIEZBSUxFRA0KICAgICAgICAgICAgICAgICAgICAoIlVuYWJsZSB0byB1 bmxpbmsgYSBzZW1hcGhvcmUgd2hpY2ggd2UganVzdCBjcmVhdGVkIik7DQogICAgICAgICAgICB9 DQogICAgICAgIH0NCiNpZiBWRVJCT1NFID4gMA0KICAgICAgICBlbHNlIHsNCiAgICAgICAgICAg IHByaW50Zg0KICAgICAgICAgICAgICAgICgiQ3JlYXRpb24gb2YgdGhlIHNlbWFwaG9yZSBmYWls ZWQgd2l0aCBlcnJvciAlZDogJXNcbiIsDQogICAgICAgICAgICAgICAgIGVycm5vLCBzdHJlcnJv cihlcnJubykpOw0KICAgICAgICB9DQoNCiNlbmRpZg0KDQogICAgfQ0KDQogICAgLyogVGVzdCBw YXNzZWQgKi8NCiNpZiBWRVJCT1NFID4gMA0KICAgIHByaW50ZigiVGVzdCBwYXNzZWRcbiIpOw0K DQojZW5kaWYNCiAgICBleGl0KDApOw0KfQ0KDQo= --_002_PH7PR11MB5795F548FFA02488A42934FCB3522PH7PR11MB5795namp_--