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: <CAGW2f1GjYwVjw=b1O+_SmSW6CvCd9R1QP54TXFo7XoMguOqR=g@mail.gmail.com>
Date:	Tue, 23 Jul 2013 13:39:39 +0000
From:	jon ernst <jonernst07@...il.com>
To:	linux-ext4@...r.kernel.org, gnehzuil.liu@...il.com
Subject: Re: [PATCH] ext4: fix a bug when we try to open a file with O_TMPFILE flag

> Ah, actually I used the following program to hit the bug.  Just for your
> information.  Please let me know if you have any question.
>
> Regards,
>                                                 - Zheng
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
>
> #include <unistd.h>
> #include <sys/types.h>
> #include <fcntl.h>
>
> #define __O_TMPFILE     020000000
> #define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
>
> int main(int argc, char *argv[])
> {
>         int fd;
>
>         fd = open(argv[1], O_RDWR|O_TMPFILE);
>         if (fd < 0) {
>                 perror("open ");
>                 return -1;
>         }
>         close(fd);
>         return 0;
> }

Thank you Zheng!  Pardon if this is a dumb question: why do we need to
manually define "O_TMPFILE"? Not like "O_APPEND" etc. ?  I saw it has
been defined in header file. (fcntl.h) Did I miss anything?

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ