lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240405062055.GC3107@lst.de>
Date: Fri, 5 Apr 2024 08:20:55 +0200
From: Christoph Hellwig <hch@....de>
To: Daniel Wagner <dwagner@...e.de>
Cc: James Smart <james.smart@...adcom.com>, Keith Busch <kbusch@...nel.org>,
	Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>,
	Hannes Reinecke <hare@...e.de>, linux-nvme@...ts.infradead.org,
	linux-kernel@...r.kernel.org, Hannes Reinecke <hare@...nel.org>
Subject: Re: [PATCH v4 3/5] nvmet: return DHCHAP status codes from
 nvmet_setup_auth()

On Thu, Apr 04, 2024 at 05:44:58PM +0200, Daniel Wagner wrote:
> From: Hannes Reinecke <hare@...nel.org>
> 
> A failure in nvmet_setup_auth() does not mean that the NVMe
> authentication command failed, so we should rather return a
> protocol error with a 'failure1' response than an NVMe status.

Nit: try to use up the 73 characters available for commit logs, this
looks weirdly, um condensed.

> @@ -131,7 +131,6 @@ int nvmet_setup_auth(struct nvmet_ctrl *ctrl)
>  	int ret = 0;
>  	struct nvmet_host_link *p;
>  	struct nvmet_host *host = NULL;
> -	const char *hash_name;
>  
>  	down_read(&nvmet_config_sem);
>  	if (nvmet_is_disc_subsys(ctrl->subsys))
> @@ -149,13 +148,16 @@ int nvmet_setup_auth(struct nvmet_ctrl *ctrl)
>  	}
>  	if (!host) {
>  		pr_debug("host %s not found\n", ctrl->hostnqn);
> -		ret = -EPERM;
> +		ret = NVME_AUTH_DHCHAP_FAILURE_FAILED;
>  		goto out_unlock;

This is now returning returning random on the wire fields that aren't
even the NVMe status codes from a function otherwise returning Linux
errno values.  I can't see how this works or is maintainable long term.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ