YueHaibing
3ebe1bca58
ppp: deflate: Fix possible crash in deflate_init
BUG: unable to handle kernel paging request at ffffffffa018f000
PGD 3270067 P4D 3270067 PUD 3271063 PMD 2307eb067 PTE 0
Oops: 0000 [#1] PREEMPT SMP
CPU: 0 PID: 4138 Comm: modprobe Not tainted 5.1.0-rc7+ #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014
RIP: 0010:ppp_register_compressor+0x3e/0xd0 [ppp_generic]
Code: 98 4a 3f e2 48 8b 15 c1 67 00 00 41 8b 0c 24 48 81 fa 40 f0 19 a0
75 0e eb 35 48 8b 12 48 81 fa 40 f0 19 a0 74
RSP: 0018:ffffc90000d93c68 EFLAGS: 00010287
RAX: ffffffffa018f000 RBX: ffffffffa01a3000 RCX: 000000000000001a
RDX: ffff888230c750a0 RSI: 0000000000000000 RDI: ffffffffa019f000
RBP: ffffc90000d93c80 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0194080
R13: ffff88822ee1a700 R14: 0000000000000000 R15: ffffc90000d93e78
FS: 00007f2339557540(0000) GS:ffff888237a00000(0000)
knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffa018f000 CR3: 000000022bde4000 CR4: 00000000000006f0
Call Trace:
? 0xffffffffa01a3000
deflate_init+0x11/0x1000 [ppp_deflate]
? 0xffffffffa01a3000
do_one_initcall+0x6c/0x3cc
? kmem_cache_alloc_trace+0x248/0x3b0
do_init_module+0x5b/0x1f1
load_module+0x1db1/0x2690
? m_show+0x1d0/0x1d0
__do_sys_finit_module+0xc5/0xd0
__x64_sys_finit_module+0x15/0x20
do_syscall_64+0x6b/0x1d0
entry_SYSCALL_64_after_hwframe+0x49/0xbe
If ppp_deflate fails to register in deflate_init,
module initialization failed out, however
ppp_deflate_draft may has been regiestred and not
unregistered before return.
Then the seconed modprobe will trigger crash like this.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-14 15:41:55 -07:00
..
2019-05-14 10:30:10 -07:00
2019-05-07 13:39:22 -07:00
2019-04-25 23:52:29 -04:00
2019-05-14 10:10:55 -07:00
2019-05-07 22:03:58 -07:00
2019-05-05 19:34:00 +02:00
2019-05-08 10:34:17 -07:00
2019-05-07 11:46:13 -07:00
2019-05-08 12:25:12 -07:00
2019-04-25 21:33:41 +02:00
2019-05-07 09:18:12 -07:00
2019-05-06 20:15:06 -07:00
2019-05-14 09:47:44 -07:00
2019-04-16 09:29:18 +09:00
2019-05-09 08:51:45 -07:00
2019-05-08 21:35:19 -07:00
2019-05-06 19:54:57 -07:00
2019-05-07 13:39:22 -07:00
2019-05-14 09:47:50 -07:00
2019-05-07 13:39:22 -07:00
2019-05-14 09:47:46 -07:00
2019-05-07 13:39:22 -07:00
2019-05-14 10:39:08 -07:00
2019-05-14 10:45:03 -07:00
2019-05-13 15:21:48 -07:00
2019-05-07 12:15:13 -07:00
2019-05-07 13:39:22 -07:00
2019-05-09 14:41:55 -07:00
2019-05-07 08:50:40 -07:00
2019-05-08 16:47:23 -07:00
2019-05-07 13:31:29 -07:00
2019-05-14 09:47:49 -07:00
2019-05-14 10:39:08 -07:00
2019-05-14 10:30:10 -07:00
2019-05-07 13:01:40 -07:00
2019-05-07 22:03:58 -07:00
2019-05-14 10:39:08 -07:00
2019-05-10 12:55:16 -04:00
2019-05-07 18:14:36 -07:00
2019-05-14 09:47:50 -07:00
2019-05-12 17:57:52 -04:00
2019-05-07 12:56:19 -07:00
2019-05-14 10:39:08 -07:00
2019-05-14 10:30:10 -07:00
2019-05-07 12:56:19 -07:00
2019-05-12 18:16:31 -04:00
2019-05-14 15:41:55 -07:00
2019-05-07 22:03:58 -07:00
2019-05-07 18:14:36 -07:00
2019-05-08 10:12:46 -07:00
2019-04-25 19:44:33 +02:00
2019-05-13 08:52:37 -07:00
2019-05-03 23:47:39 +02:00
2019-05-09 08:40:55 -07:00
2019-05-14 10:30:10 -07:00
2019-04-23 12:29:37 +01:00
2019-05-08 10:03:52 -07:00
2019-05-14 10:39:08 -07:00
2019-05-14 10:39:08 -07:00
2019-05-08 12:06:52 +01:00
2019-05-09 09:19:26 -07:00
2019-05-10 12:57:15 -04:00
2019-05-14 09:47:46 -07:00
2019-04-20 12:16:52 +02:00
2019-05-06 22:52:14 +09:00
2019-04-24 10:30:45 +10:00
2019-05-12 07:00:21 -04:00
2019-05-14 14:12:59 -07:00
2019-05-14 09:47:46 -07:00
2019-05-14 09:47:46 -07:00
2019-04-25 22:23:06 +02:00
2019-04-30 17:55:08 +02:00
2019-05-02 17:17:51 +02:00
2019-05-09 08:51:45 -07:00
2019-05-07 22:03:58 -07:00
2019-05-14 10:45:03 -07:00
2019-05-08 10:12:46 -07:00
2019-05-14 09:47:46 -07:00
2019-05-07 13:39:22 -07:00
2019-05-09 08:51:45 -07:00
2019-05-14 10:45:03 -07:00
2019-05-14 09:47:46 -07:00
2019-05-14 14:12:59 -07:00
2019-05-14 10:45:03 -07:00
2019-05-14 09:47:46 -07:00
2019-05-12 13:11:35 -04:00
2019-05-07 13:39:22 -07:00
2019-05-13 09:20:42 -04:00
2019-05-14 09:47:50 -07:00
2019-04-25 21:33:37 +02:00
2019-04-25 21:33:37 +02:00