Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1325546
| From | Dmitry Vyukov <dvyukov@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | gigaset: memory leak in gigaset_initcshw |
| Date | 2016-02-03 16:40 +0100 |
| Message-ID | <qY7Hc-3L6-15@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Hello,
The following program causes a memory leak of ser_cardstate object
allocated in gigaset_initcshw:
// autogenerated by syzkaller (http://github.com/google/syzkaller)
#include <pthread.h>
#include <stdint.h>
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>
int main()
{
long r[7];
memset(r, -1, sizeof(r));
r[0] = syscall(SYS_mmap, 0x20000000ul, 0x10000ul, 0x3ul, 0x32ul,
0xfffffffffffffffful, 0x0ul);
r[2] = syscall(SYS_open, "/dev/ptmx", 0x8002ul, 0x0ul, 0, 0, 0);
*(uint32_t*)0x20002b1e = (uint32_t)0x10;
r[4] = syscall(SYS_ioctl, r[2], 0x5423ul, 0x20002b1eul, 0, 0, 0);
*(uint32_t*)0x20009000 = (uint32_t)0x7;
r[6] = syscall(SYS_ioctl, r[2], 0x5423ul, 0x20009000ul, 0, 0, 0);
return 0;
}
unreferenced object 0xffff88002b4109d8 (size 2048):
comm "a.out", pid 9565, jiffies 4301785161 (age 10.646s)
hex dump (first 32 bytes):
e0 30 0a 87 ff ff ff ff 00 00 00 00 00 00 00 00 .0..............
80 af 0d 88 ff ff ff ff 88 08 5e 00 00 88 ff ff ..........^.....
backtrace:
[< inline >] kzalloc include/linux/slab.h:607
[<ffffffff84bfbeab>] gigaset_initcshw+0x4b/0x2b0
drivers/isdn/gigaset/ser-gigaset.c:394
[<ffffffff84bb1e22>] gigaset_initcs+0xf82/0x1660
drivers/isdn/gigaset/common.c:748
[<ffffffff84bfb65b>] gigaset_tty_open+0x9b/0x460
drivers/isdn/gigaset/ser-gigaset.c:516
[<ffffffff82f9a648>] tty_ldisc_open.isra.2+0x78/0xd0
drivers/tty/tty_ldisc.c:454
[<ffffffff82f9ac32>] tty_set_ldisc+0x292/0x8a0 drivers/tty/tty_ldisc.c:561
[< inline >] tiocsetd drivers/tty/tty_io.c:2656
[<ffffffff82f8390e>] tty_ioctl+0xb2e/0x2160 drivers/tty/tty_io.c:2911
[< inline >] vfs_ioctl fs/ioctl.c:43
[<ffffffff817fa9ec>] do_vfs_ioctl+0x18c/0xfb0 fs/ioctl.c:674
[< inline >] SYSC_ioctl fs/ioctl.c:689
[<ffffffff817fb89f>] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:680
[<ffffffff8665ebb6>] entry_SYSCALL_64_fastpath+0x16/0x7a
arch/x86/entry/entry_64.S:185
On commit 34229b277480f46c1e9a19f027f30b074512e68b.
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
gigaset: memory leak in gigaset_initcshw Dmitry Vyukov <dvyukov@google.com> - 2016-02-03 16:40 +0100
Re: gigaset: memory leak in gigaset_initcshw Paul Bolle <pebolle@tiscali.nl> - 2016-02-03 17:20 +0100
Re: gigaset: memory leak in gigaset_initcshw Paul Bolle <pebolle@tiscali.nl> - 2016-02-03 20:20 +0100
Re: gigaset: memory leak in gigaset_initcshw Dmitry Vyukov <dvyukov@google.com> - 2016-02-04 11:50 +0100
Re: gigaset: memory leak in gigaset_initcshw Paul Bolle <pebolle@tiscali.nl> - 2016-02-04 14:20 +0100
Re: gigaset: memory leak in gigaset_initcshw Paul Bolle <pebolle@tiscali.nl> - 2016-02-04 15:00 +0100
Re: gigaset: memory leak in gigaset_initcshw Dmitry Vyukov <dvyukov@google.com> - 2016-02-04 16:00 +0100
Re: gigaset: memory leak in gigaset_initcshw Paul Bolle <pebolle@tiscali.nl> - 2016-02-04 16:10 +0100
Re: gigaset: memory leak in gigaset_initcshw Dmitry Vyukov <dvyukov@google.com> - 2016-02-05 14:40 +0100
Re: gigaset: memory leak in gigaset_initcshw Paul Bolle <pebolle@tiscali.nl> - 2016-02-05 17:10 +0100
Re: gigaset: memory leak in gigaset_initcshw Paul Bolle <pebolle@tiscali.nl> - 2016-02-05 19:40 +0100
Re: gigaset: memory leak in gigaset_initcshw Dmitry Vyukov <dvyukov@google.com> - 2016-02-05 22:30 +0100
csiph-web