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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 15 Apr 2019 16:20:17 -0700
From:   Khazhismel Kumykov <>
To:     Tetsuo Handa <>
Cc:     syzbot <>,
        linux-fsdevel <>,, Al Viro <>,
        Linux Kernel Mailing List <>,
Subject: Re: WARNING in notify_change

I was able to reproduce this by setting security.capability xattr on a
blockdev file, then writing to it - when writing to the blockdev we
never lock the inode, so when we clear the capability we hit this
lockdep warning.

Is the issue here that we can set this xattr in the first place so we
have to clear it at all? Or should we really be locking the inode for
blockdevs after all? I'm not too familiar, but my gut says former

this reproducer is able to immediately crash machine running

#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <attr/xattr.h>

char *disk = "/dev/loop0";

int main(void) {
        int fd = open(disk, 0);
        if (fd < 0)
                printf("open: %d\n", errno);

        system("dd if=/dev/zero of=a_file count=51200");
        system("losetup /dev/loop0 a_file");

        uint32_t value[5] = {

        int res = fsetxattr(fd, "security.capability", &value,
sizeof(value), XATTR_CREATE);
        if (res < 0)
                printf ("xattr: %d\n", errno);

        int fd2 = open(disk, O_RDWR);
        write(fd2, "hello", 5);
        return 0;

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4843 bytes)

Powered by blists - more mailing lists