Re: 2.1.111 AX.25 changes ?

Pierfrancesco Caci (ik5pvx@penny.ik5pvx.ampr.org)
26 Jul 1998 18:57:07 +0200


Matthias Welwarsky <dg2fef@afthd.tu-darmstadt.de> writes:

>
> Pierfrancesco Caci wrote:
> >
> > Did something change with AX.25 support in 2.1.111 ? It doesn't
> > recognise my ax25d.conf file anymore with an error like "bad parameter
> > for port vhf" or something like that.
> >
>
> The following patch should fix this.
>
> --- af_ax25.c.old Sun Jul 26 12:26:22 1998
> +++ af_ax25.c Sun Jul 26 12:39:02 1998
> @@ -1009,7 +1009,10 @@
> if (sk->zapped == 0)
> return -EINVAL;
>
> - if (addr_len != sizeof(struct sockaddr_ax25) && addr_len != sizeof(struct full_sockaddr_ax25))
> + if (addr_len < sizeof(struct sockaddr_ax25) || addr_len > sizeof(struct full_sockaddr_ax25))
> + return -EINVAL;
> +
> + if (addr_len < (addr->fsa_ax25.sax25_ndigis * sizeof(ax25_address) + sizeof(struct sockaddr_ax25)))
> return -EINVAL;
>
> if (addr->fsa_ax25.sax25_family != AF_AX25)
>

Ok, I applied the patch, the problems when starting ax25d disappear,
but I get the following oops as soon as I receive an ax25 connection.

Unable to handle kernel NULL pointer dereference at virtual address 00000040
current->tss.cr3 = 030a4000, %cr3 = 030a4000
*pde = 00000000
Oops: 0000
CPU: 0
EIP: 0010:[<c01775c1>]
EFLAGS: 00010246
eax: 00000000 ebx: c3111e8c ecx: c37176e0 edx: c3a84800
esi: c336808c edi: c303ff14 ebp: c303ff0c esp: c303fe7c
ds: 0018 es: 0018 ss: 0018
Process ax25d (pid: 492, process nr: 49, stackpage=c303f000)
Stack: c3111e8c c336808c c303ff14 bffff9b4 c37176e0 00000282 c17f9140 c3111e00
96920003 b0aca06a c013027f 00000000 00000007 00000000 c3111e00 c3111e00
c17f9140 c3111e00 c0130459 c17f9140 c3111e00 c31a7200 00000004 c014b254
Call Trace: [<c013027f>] [<c0130459>] [<c014b254>] [<c014be5b>] [<c011b091>] [<c011d44c>] [<c011b60a>]
[<c014cbc8>] [<c0109da0>] [<c0109c38>]
Code: 8a 40 40 88 44 24 1c 0f b6 f0 89 74 24 2c c6 44 24 18 00 8a

Using `/boot/System.map-2.1.111' to map addresses to symbols.

>>EIP: c01775c1 <ax25_getname+71/190>
Trace: c013027f <shrink_dcache_parent+1f/24>
Trace: c0130459 <d_alloc_root+31/3c>
Trace: c014b254 <get_fd+3c/c8>
Trace: c014be5b <sys_accept+f3/180>
Trace: c011b091 <do_wp_page+221/264>
Trace: c011d44c <filemap_nopage>
Trace: c011b60a <handle_mm_fault+13a/160>
Trace: c014cbc8 <sys_socketcall+f8/248>
Trace: c0109da0 <error_code+30/40>
Trace: c0109c38 <system_call+38/40>
Code: c01775c1 <ax25_getname+71/190>
Code: c01775c1 <ax25_getname+71/190> 8a 40 40 movb 0x40(%eax),%al
Code: c01775c4 <ax25_getname+74/190> 88 44 24 1c movb %al,0x1c(%esp,1)
Code: c01775c8 <ax25_getname+78/190> 0f b6 f0 movzbl %al,%esi
Code: c01775d1 <ax25_getname+81/190> 89 74 24 2c movl %esi,0x2c(%esp,1)
Code: c01775d5 <ax25_getname+85/190> c6 44 24 18 00 movb $0x0,0x18(%esp,1)
Code: c01775da <ax25_getname+8a/190> 8a 00 movb (%eax),%al
Code: c01775e2 <ax25_getname+92/190> 90 nop
Code: c01775e3 <ax25_getname+93/190> 90 nop
Code: c01775e4 <ax25_getname+94/190> 90 nop

ax25d is:
ax25d -v
ax25d: ax25-utils-2.1.42a - 11 Aug 1997

System is:
./ver_linux
-- Versions installed: (if some fields are empty or looks
-- unusual then possibly you have very old versions)
Linux penny 2.1.111 #2 Sun Jul 26 13:55:00 CEST 1998 i586 unknown
Kernel modules 2.1.85
Gnu C 2.7.2.3
Binutils 2.9.1.0.4
Linux C Library 5.4.44
Dynamic Linker (ld.so) 1.9.9
Linux C++ Library 27.2.8
Procps 1.2.2
Mount 2.7l
Net-tools (1998-03-02)
Kbd 0.89
Sh-utils 1.16

I'm going to try and recompile ax25utils, just in case...

Pf

-- 

------------------------------------------------------------------------------- Pierfrancesco Caci | mailto:p.caci@flashnet.it - http://gusp.infogroup.it ik5pvx | http://www.geocities.com/SoHo/Lofts/8999 Firenze - Italia | Office for the Complication of Otherwise Simple Affairs Linux penny 2.1.111 #2 Sun Jul 26 13:55:00 CEST 1998 i586 unknown

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html