Bug 75238 - kdm doesn't handle IPv6 mapped IPv4 addresses
Summary: kdm doesn't handle IPv6 mapped IPv4 addresses
Status: RESOLVED WORKSFORME
Alias: None
Product: kdm
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdm bugs tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-14 18:20 UTC by Matt Darland
Modified: 2008-05-19 17:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
kdm strace of remote login on IPv6 enabled system (40.44 KB, text/plain)
2004-04-23 02:36 UTC, Matt Darland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Darland 2004-02-14 18:20:22 UTC
Version:            (using KDE KDE 3.2.0)
Installed from:    Gentoo Packages
OS:          Linux

When IPv6 is enabled on a Linux system, ALL inbound remote logins using IPv4 to kdm fail with an error message( when kdm debugging turned on ) stating:
"ConvertAddr returning -1 for family 10."

This causes the ~/.Xauthority file to not be able to be updated, which causes the login to be denied.

Without kdm debugging turned on the error manifiests itself in the system log as:
"can't update authorization file in home dir /home/myhomedir"

I took a peek at the KDE source code( both 3.1.5 and 3.2 ) and noticed that the function ConvertAddr() doesn't handle IPv6 at all.  
From looking at other bug reports it seems that kdm will bind to IPv6 by default if the OS supports it.  This causes inbound IPv4 addrs to get mapped to IPv6 and then they are passed to ConvertAddr().

I've also filed in the Gentoo bug database as bug ID 41556.
Comment 1 Oswald Buddenhagen 2004-04-10 18:27:13 UTC
yeah, i've got the same report a long time ago already. and i must admit, i still have no idea what the problem is. kdm does _not_ listen to ipv6, it doesn't even know it exists. to me this looks like a bug in the ipv4 compatibility layer, as it is supposed to be completely transparent ...
please run kdm through strace, with verbose display of structure contents. i need to know where the ipv6 address comes from.

fwiw, i'll make kdm ipv6-capable shortly, but i consider this independent from this problem.
Comment 2 Oswald Buddenhagen 2004-04-17 15:39:09 UTC
fwiw, i cannot reproduce the problem, so i'll have to close the report unless you cooperate ...
Comment 3 Matt Darland 2004-04-23 02:36:33 UTC
Created attachment 5730 [details]
kdm strace of  remote login on IPv6 enabled system

strace run of kdm running on an IPv6 enabled Linux system. Trace taken during
the (attenpted) establishment of a remote xdm session via IP4.
Comment 4 Matt Darland 2004-04-23 02:42:32 UTC
Comment on attachment 5730 [details]
kdm strace of  remote login on IPv6 enabled system

Better comments:

strace taken with command:
strace -x -e verbose=all -o kdm.strace -ff kdm -nodaemon

Points of interest:
Line 714 of trace is where a log message is printed that "Cannot convert
Internet address 4.0.255.191 to host name"
The address of the connecting machine was 192.168.1.100, so I'm not sure where
the first address was coming from.

Current system setup:
Linux 2.6.5-gentoo-r1
X.org 6.7.0
KDE 3.2.1
2 NICs
Comment 5 Oswald Buddenhagen 2004-04-23 15:47:56 UTC
whoops. the fallback hostname (ascii ip address) generation was screwed up. fixed in 3.2 branch (and in HEAD some days ago already, as a side effect of the full ipv6 support).
the trigger of the problem ... gethostbyaddr doesn't seem to reverse-resolve the ipv4 address at all ...

whether this problem is related to your original report is another question.
please upgrade from cvs and test again. if the problem persists, create another trace, but add "-s 64" to the strace options and "-debug 1" to the kdm options.
Comment 6 Matt Darland 2004-04-24 01:08:37 UTC
Somewhere in the process of upgrading from kernel 2.6.3 to 2.6.5, and upgrading from XFree to X.org, the original bug doesn't seem to be reproducible.

Regarding the hostname problem, I was assuming that the kdm Xaccess file supported the same options as the xdm Xaccess file.  I had some incompatible directives.

The problem seems to be fixed on my end now.
Comment 7 Oswald Buddenhagen 2004-04-24 02:10:51 UTC
damnit, why do the really interesting problems hide when one tries to investigate them? :)