Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 26 Feb 2001 09:28:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 26 Feb 2001 09:28:41 -0500 Received: from zeus.kernel.org ([209.10.41.242]:53191 "EHLO zeus.kernel.org") by vger.kernel.org with ESMTP id ; Mon, 26 Feb 2001 09:28:27 -0500 Envelope-To: Date: Mon, 26 Feb 2001 13:13:24 +0000 (GMT) From: James Stevenson To: Linux Kernel Subject: unix_ioctl ? Message-ID: X-mailer: Pine 4.21 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi i notcied in unix_ioctl at the start of most of its functions is it possible for the sock->sk to be NULL ? static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) { struct sock *sk = sock->sk; as there is no test to see if its null it just jumps in and uses its data and could i thave caused this ? ksymoops 2.3.4 on i686 2.2.18. Options used -V (default) -k /proc/ksyms (default) -l /proc/modules (default) -o /lib/modules/2.2.18/ (default) -m /boot/System.map (specified) No modules in ksyms, skipping objects Warning (read_lsmod): no symbols in lsmod, is /proc/modules a valid lsmod file? Unable to handle kernel NULL pointer dereference at virtual address 000001c4 current->tss.cr3 = 01f00000, %cr3 = 01f00000 *pde = 00000000 Oops: 0000 CPU: 0 EIP: 0010:[] Using defaults from ksymoops -t elf32-i386 -a i386 EFLAGS: 00010202 eax: c18e0684 ebx: 00000000 ecx: 00000168 edx: bfffee9c esi: c18e0640 edi: bfffee9c ebp: 0000541b esp: c1ef3f80 ds: 0018 es: 0018 ss: 0018 Process gnome-terminal (pid: 888, process nr: 47, stackpage=c1ef3000) Stack: c0162d81 c17614e0 0000541b bfffee9c c1713980 c012d7bd c1761440 c1713980 0000541b bfffee9c c1ef2000 00000000 00000000 bfffee58 c18e7e40 c1761440 c0109374 00000004 0000541b bfffee9c 00000000 00000000 bfffee58 00000036 Call Trace: [] [] [] [] Code: 8b 59 5c 8b 44 24 14 89 da e8 73 e9 04 00 eb 06 90 b8 ea ff >>EIP; c01880c3 <===== Trace; c0162d81 Trace; c012d7bd Trace; c0109374 Trace; c010002b Code; c01880c3 00000000 <_EIP>: Code; c01880c3 <===== 0: 8b 59 5c mov 0x5c(%ecx),%ebx <===== Code; c01880c6 3: 8b 44 24 14 mov 0x14(%esp,1),%eax Code; c01880ca 7: 89 da mov %ebx,%edx Code; c01880cc 9: e8 73 e9 04 00 call 4e981 <_EIP+0x4e981> c01d6a44 <__put_user_4+0/18> Code; c01880d1 e: eb 06 jmp 16 <_EIP+0x16> c01880d9 Code; c01880d3 10: 90 nop Code; c01880d4 11: b8 ea ff 00 00 mov $0xffea,%eax 1 warning issued. Results may not be reliable. thanks James -- --------------------------------------------- Check Out: http://stev.org E-Mail: mistral@stev.org 1:10pm up 24 days, 20:55, 7 users, load average: 2.10, 1.36, 1.09 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/