GitHub PushEvent at 2014-11-02 20:07:43
Repository: android_kernel_htc_pico
Actor: Gamersab
Payload: {"shas":[["641b2c84235012aa30ebfc710cdfc2193300cb98","8d417593a808f1372b8cf31a062d2517b0384f79@codeaurora.org","selinux: Fix Kernel panic due to NULL pointer dereference\n\nBelow Kernel panic is observed due to race condition, where\nsock_has_perm called in a thread and is trying to access sksec->sid\nwithout checking sksec. Just before that, sk->sk_security was set\nto NULL by selinux_sk_free_security through sk_free in other thread.\n\n31704.949269:   <3> IPv4: Attempt to release alive inet socket dd81b200\n31704.959049:   <1> Unable to handle kernel NULL pointer dereference at \\\n                        virtual address 00000000\n31704.983562:   <1> pgd = c6b74000\n31704.985248:   <1> [00000000] *pgd=00000000\n31704.996591:   <0> Internal error: Oops: 5 [#1] PREEMPT SMP ARM\n31705.001016:   <6> Modules linked in: adsprpc [last unloaded: wlan]\n31705.006659:   <6> CPU: 1    Tainted: G           O  \\\n                        (3.4.0-g837ab9b-00003-g6bcd9c6 #1)\n31705.014042:   <6> PC is at sock_has_perm+0x58/0xd4\n31705.018292:   <6> LR is at sock_has_perm+0x58/0xd4\n31705.022546:   <6> pc : [<c0341e8c>]    lr : [<c0341e8c>]    \\\n                                                  psr: 60000013\n31705.022549:   <6> sp : dda27f00  ip : 00000000  fp : 5f36fc84\n31705.034002:   <6> r10: 00004000  r9 : 0000009d  r8 : e8c2b700\n31705.039211:   <6> r7 : dda27f24  r6 : dd81b200  r5 : 00000000  \\\n                                                  r4 : 00000000\n31705.045721:   <6> r3 : 00000000  r2 : dda27ef8  r1 : 00000000  \\\n                                                  r0 : dda27f54\n31705.052232:   <6> Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM \\\n                        Segment user\n31705.059349:   <6> Control: 10c5787d  Table: 10d7406a  DAC: 00000015\n.\n.\n.\n.\n31705.697816:   <6> [<c0341e8c>] (sock_has_perm+0x58/0xd4) from \\\n                    [<c033ed10>] (security_socket_getsockopt+0x14/0x1c)\n31705.707534:   <6> [<c033ed10>] (security_socket_getsockopt+0x14/0x1c) \\\n                           from [<c0745c18>] (sys_getsockopt+0x34/0xa8)\n31705.717343:   <6> [<c0745c18>] (sys_getsockopt+0x34/0xa8) from \\\n                    [<c0106140>] (ret_fast_syscall+0x0/0x30)\n31705.726193:   <0> Code: e59832e8 e5933058 e5939004 ebfac736 (e5953000)\n31705.732635:   <4> ---[ end trace 22889004dafd87bd ]---\n\nChange-Id: I79c3fb525f35ea2494d53788788cd71a38a32d6b\nSigned-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>\nSigned-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>","Satya Durga Srinivasu Prabhala",true],["acae20bdd4e4908be1a42af08495f00839cc4bdd","3d00b54ad717112934d0b63b7ac2975b44022a61@I-love.SAKURA.ne.jp","SELinux: Fix memory leak upon loading policy\n\nHello.\n\nI got below leak with linux-3.10.0-54.0.1.el7.x86_64 .\n\n[  681.903890] kmemleak: 5538 new suspected memory leaks (see /sys/kernel/debug/kmemleak)\n\nBelow is a patch, but I don't know whether we need special handing for undoing\nebitmap_set_bit() call.\n----------\n>>From fe97527a90fe95e2239dfbaa7558f0ed559c0992 Mon Sep 17 00:00:00 2001\nFrom: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>\nDate: Mon, 6 Jan 2014 16:30:21 +0900\nSubject: [PATCH] SELinux: Fix memory leak upon loading policy\n\nCommit 2463c26d \"SELinux: put name based create rules in a hashtable\" did not\ncheck return value from hashtab_insert() in filename_trans_read(). It leaks\nmemory if hashtab_insert() returns error.\n\n  unreferenced object 0xffff88005c9160d0 (size 8):\n    comm \"systemd\", pid 1, jiffies 4294688674 (age 235.265s)\n    hex dump (first 8 bytes):\n      57 0b 00 00 6b 6b 6b a5                          W...kkk.\n    backtrace:\n      [<ffffffff816604ae>] kmemleak_alloc+0x4e/0xb0\n      [<ffffffff811cba5e>] kmem_cache_alloc_trace+0x12e/0x360\n      [<ffffffff812aec5d>] policydb_read+0xd1d/0xf70\n      [<ffffffff812b345c>] security_load_policy+0x6c/0x500\n      [<ffffffff812a623c>] sel_write_load+0xac/0x750\n      [<ffffffff811eb680>] vfs_write+0xc0/0x1f0\n      [<ffffffff811ec08c>] SyS_write+0x4c/0xa0\n      [<ffffffff81690419>] system_call_fastpath+0x16/0x1b\n      [<ffffffffffffffff>] 0xffffffffffffffff\n\nHowever, we should not return EEXIST error to the caller, or the systemd will\nshow below message and the boot sequence freezes.\n\n  systemd[1]: Failed to load SELinux policy. Freezing.\n\nSigned-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>\nAcked-by: Eric Paris <eparis@redhat.com>\nCc: stable@vger.kernel.org\nSigned-off-by: Paul Moore <pmoore@redhat.com>","Tetsuo Handa",true]],"size":2,"ref":"refs/heads/android-4.4","head":"acae20bdd4e4908be1a42af08495f00839cc4bdd"}