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] [day] [month] [year] [list]
Date:   Sat, 6 Mar 2021 22:37:49 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To:     Jia-Ju Bai <baijiaju1990@...il.com>
Cc:     linux-security-module@...r.kernel.org,
        linux-kernel@...r.kernel.org, jmorris@...ei.org, serge@...lyn.com
Subject: Re: [PATCH] security: tomoyo: fix error return code of
 tomoyo_update_domain()

On 2021/03/06 22:03, Jia-Ju Bai wrote:
> When mutex_lock_interruptible() fails, the error return code of
> tomoyo_update_domain() is not properly assigned.
> To fix this bug, error is assigned with the return value of
> mutex_lock_interruptible(), and then error is checked.

Thanks for a patch, but this patch is wrong.
Since the variable "error" is initialized as

  int error = is_delete ? -ENOENT : -ENOMEM;

at the beginning of this function, unconditionally overwriting
this variable with the return code of mutex_lock_interruptible() breaks

  if (error && !is_delete) {
  }

block of this function.

And the caller does not check if the return code is -EINTR
instead of -ENOENT or -ENOMEM.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ