public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug stdio/18906] New: fopen: ccs value may affect open mode
@ 2015-09-01 14:24 valery_reznic at yahoo dot com
2015-09-04 9:48 ` [Bug stdio/18906] " fweimer at redhat dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: valery_reznic at yahoo dot com @ 2015-09-01 14:24 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18906
Bug ID: 18906
Summary: fopen: ccs value may affect open mode
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: stdio
Assignee: unassigned at sourceware dot org
Reporter: valery_reznic at yahoo dot com
Target Milestone: ---
Created attachment 8569
--> https://sourceware.org/bugzilla/attachment.cgi?id=8569&action=edit
test program to demonstrate the problem
I fopen mode looks like
"r,ccs=+..."
"r,ccs=x..."
"r,ccs=e..."
Then first symbol from the ccs value will affect open flags.
For example, if mode = "r,ccs=+" then file will be opened with O_RDWR instead
of
O_RDONLY
Here the starce output:
execve("./fopen_test", ["./fopen_test"], [/* 52 vars */]) = 0
brk(0) = 0xb10000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f51bf48b000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=143162, ...}) = 0
mmap(NULL, 143162, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f51bf468000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\36\302\2026\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2096496, ...}) = 0
mmap(0x3682c00000, 3920480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x3682c00000
mprotect(0x3682db4000, 2093056, PROT_NONE) = 0
mmap(0x3682fb3000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b3000) = 0x3682fb3000
mmap(0x3682fb9000, 16992, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3682fb9000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f51bf467000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f51bf465000
arch_prctl(ARCH_SET_FS, 0x7f51bf465740) = 0
mprotect(0x3682fb3000, 16384, PROT_READ) = 0
mprotect(0x600000, 4096, PROT_READ) = 0
mprotect(0x3682a1f000, 4096, PROT_READ) = 0
munmap(0x7f51bf468000, 143162) = 0
brk(0) = 0xb10000
brk(0xb31000) = 0xb31000
brk(0) = 0xb31000
open("aaa", O_RDWR) = -1 ENOENT (No such file or directory)
exit_group(0) = ?
+++ exited with 0 +++
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug stdio/18906] fopen: ccs value may affect open mode
2015-09-01 14:24 [Bug stdio/18906] New: fopen: ccs value may affect open mode valery_reznic at yahoo dot com
@ 2015-09-04 9:48 ` fweimer at redhat dot com
2023-07-12 13:12 ` josimmon at redhat dot com
2023-07-12 13:33 ` schwab@linux-m68k.org
2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2015-09-04 9:48 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18906
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug stdio/18906] fopen: ccs value may affect open mode
2015-09-01 14:24 [Bug stdio/18906] New: fopen: ccs value may affect open mode valery_reznic at yahoo dot com
2015-09-04 9:48 ` [Bug stdio/18906] " fweimer at redhat dot com
@ 2023-07-12 13:12 ` josimmon at redhat dot com
2023-07-12 13:33 ` schwab@linux-m68k.org
2 siblings, 0 replies; 4+ messages in thread
From: josimmon at redhat dot com @ 2023-07-12 13:12 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18906
Joseph Simmons-Talbott <josimmon at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |josimmon at redhat dot com
--- Comment #1 from Joseph Simmons-Talbott <josimmon at redhat dot com> ---
This is fixed in 5324d258427fd11ca0f4f595c94016e568b26d6b
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug stdio/18906] fopen: ccs value may affect open mode
2015-09-01 14:24 [Bug stdio/18906] New: fopen: ccs value may affect open mode valery_reznic at yahoo dot com
2015-09-04 9:48 ` [Bug stdio/18906] " fweimer at redhat dot com
2023-07-12 13:12 ` josimmon at redhat dot com
@ 2023-07-12 13:33 ` schwab@linux-m68k.org
2 siblings, 0 replies; 4+ messages in thread
From: schwab@linux-m68k.org @ 2023-07-12 13:33 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18906
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |2.38
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-12 13:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-01 14:24 [Bug stdio/18906] New: fopen: ccs value may affect open mode valery_reznic at yahoo dot com
2015-09-04 9:48 ` [Bug stdio/18906] " fweimer at redhat dot com
2023-07-12 13:12 ` josimmon at redhat dot com
2023-07-12 13:33 ` schwab@linux-m68k.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).