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-next>] [day] [month] [year] [list]
Date:   Mon, 24 Jun 2019 15:29:06 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     krisman@...labora.com
Cc:     linux-ext4@...r.kernel.org
Subject: [bug report] ext4: optimize case-insensitive lookups

Hello Gabriel Krisman Bertazi,

The patch 3ae72562ad91: "ext4: optimize case-insensitive lookups"
from Jun 19, 2019, leads to the following static checker warning:

	fs/ext4/namei.c:1311 ext4_fname_setup_ci_filename()
	warn: 'cf_name->len' unsigned <= 0

fs/ext4/namei.c
  1296  void ext4_fname_setup_ci_filename(struct inode *dir, const struct qstr *iname,
  1297                                    struct fscrypt_str *cf_name)
  1298  {
  1299          if (!IS_CASEFOLDED(dir)) {
  1300                  cf_name->name = NULL;
  1301                  return;
  1302          }
  1303  
  1304          cf_name->name = kmalloc(EXT4_NAME_LEN, GFP_NOFS);
  1305          if (!cf_name->name)
  1306                  return;
  1307  
  1308          cf_name->len = utf8_casefold(EXT4_SB(dir->i_sb)->s_encoding,
  1309                                       iname, cf_name->name,
  1310                                       EXT4_NAME_LEN);

utf8_casefold() returns negative error codes

  1311          if (cf_name->len <= 0) {

but "cf_name->len" is a u32.

  1312                  kfree(cf_name->name);
  1313                  cf_name->name = NULL;
  1314          }
  1315  }


regards,
dan carpenter

Powered by blists - more mailing lists