Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp248758pxf; Thu, 8 Apr 2021 02:07:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8n+zmQdreQ6WyiWYEsSw2Mi9O8Wi6EYCsBkaRltUPRI3SxLT1akGYLUXyEIU0Atp81uhD X-Received: by 2002:a17:906:495:: with SMTP id f21mr9067057eja.72.1617872847731; Thu, 08 Apr 2021 02:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617872847; cv=none; d=google.com; s=arc-20160816; b=eLs8uI7BRQ/LiDVuVIy90WUve0ZzLgoB4ziR395OIS7QB+eGtQkh/ZBWx8lGk1bEaf 3KdX/KuQDUGWntMdtq7Ef9VnoPlDb2bXOepu7+ycI672DJpG3c/PuddOch3YYVo/C5Nu 1B6pMSNJxzbub+zHDbL/TCS9liQU3EgA4MvGi5dmZwPbvlH6pDB8vWppSV57L26a3pCY t6YsjNguiISHUlTojaEig3ISikD7PNMWCI6+GMhODHat6bCVDcDUM9lS7voFhmaEmkOX 5khqvhu8F1rUH4DYiULPrPFhQ3ZyofxJFwFiIJ6xSXVk1yw+t5cS7e7fltQ423G0ygLD 3q+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=iltK01d5af+cgrFEZUWX6FRdwy+PU/iuoHEp7kNrWqY=; b=N0KFkuZyoJEMV2Rbti0Sj0OHtdjIu4Tl9t4dLf5P5V7xAtBZrEr7gcIGRXPH+u7TQC zXEGawpZZOC+2nDVBKt+FQuM8s7eo2ev8nC0VeVGjol0urEynYpdsDxrMCkXt8e7YFRm 0jKceGbSsxQIdwImlOhvFmDKKKkZY8CB5lIquG6s02uQypH4p6BWDJrff8uK6pQffjdc 2yEwUQsDyix1lhoOL3Y5gb/6WUPTdQEjfMoTmBt39qLEcMC5yOsi70S2MA7QFC59TPIS zTApfSnCMYnD2IS6AildPE//A8nREFUWWs7s5XE5kp3HLaH84gU3cQVxeNnxYNYU0YOT qFRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=vGH05aUH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm24si13657875edb.297.2021.04.08.02.07.04; Thu, 08 Apr 2021 02:07:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=vGH05aUH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230297AbhDHJFF (ORCPT + 99 others); Thu, 8 Apr 2021 05:05:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:40234 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbhDHJFC (ORCPT ); Thu, 8 Apr 2021 05:05:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1617872690; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iltK01d5af+cgrFEZUWX6FRdwy+PU/iuoHEp7kNrWqY=; b=vGH05aUHS9p50eqCjbT5JaY1Yvw3q0NrAY2X7kbk5W330yke4rShHaqeDBV1StzMZcSOTB XRstldq8Dsc0Trhe3CspZLxobWLPD5yoKd6SWdQuxQ1nb5Djga5RO3WDM5uRk7oobPbM0t Xqu9j9SkcLnNrrtgWyOiUjt2/Bh8onQ= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 2E29FAFF6; Thu, 8 Apr 2021 09:04:50 +0000 (UTC) Message-ID: <8918b0b50068705a865ffc22fe9745dacf0c21e8.camel@suse.com> Subject: Re: [PATCH 2/3] USB: cdc-acm: fix unprivileged TIOCCSERIAL From: Oliver Neukum To: Johan Hovold , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 08 Apr 2021 09:48:38 +0200 In-Reply-To: <20210407102845.32720-3-johan@kernel.org> References: <20210407102845.32720-1-johan@kernel.org> <20210407102845.32720-3-johan@kernel.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, den 07.04.2021, 12:28 +0200 schrieb Johan Hovold: > TIOCSSERIAL is a horrid, underspecified, legacy interface which for most > serial devices is only useful for setting the close_delay and > closing_wait parameters. > > A non-privileged user has only ever been able to set the since long > deprecated ASYNC_SPD flags and trying to change any other *supported* > feature should result in -EPERM being returned. Setting the current > values for any supported features should return success. > > Fix the cdc-acm implementation which instead indicated that the > TIOCSSERIAL ioctl was not even implemented when a non-privileged user > set the current values. Hi, the idea here was that you are setting something else, if you are not changing a parameter that can be changed. That conclusion is dubious, but at the same time, this implementation can change only these two parameters. So can the test really be dropped as opposed to be modified? Regards Oliver