English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   support.FS-UAE (https://eab.abime.net/forumdisplay.php?f=122)
-   -   bsdsocket_library crashes on DEBIAN (https://eab.abime.net/showthread.php?t=113970)

avantgarden 18 March 2023 20:33

bsdsocket_library crashes on DEBIAN
 
Hello gurus!!
A very nasty and easily reproductible bug...

- install Xubuntu on a virtual machine
- install fs-uae via apt-get
- emulate AmigaOS 3.1 + KICK 3.1 with bsdsocket_library = 1
- spawn a TELNETD via INETD (Amitcp 3 Aminet version)
- "telnet localhost" on another terminal

--> *** buffer overflow detected ***: terminated <---

More info (and tears) here:
https://github.com/FrodeSolheim/fs-uae/issues/327
(issue filed by me)

Any clues?
Many thanks!!!

patrik 18 March 2023 23:10

This will probably not help, but it wont cost you much to try.

Have seen variants of UAE crash from misbehaving Amiga programs before. So I was thinking, that if it is the same telnetd as in this thread http://eab.abime.net/showthread.php?t=112069 it could very well be some secondary issue caused by overrunning the stack and doing random stuff in conjunction with the call over to the host Linux OS TCP/IP-stack.

So see if it helps giving telnetd a larger stack, should be possible via the inetd config. Else try something like stackattack on aminet.

avantgarden 18 March 2023 23:55

Thank you!!

Not sure how to specify stack size in AMITCP inetd.conf...

Tried with "stackattack_020 MIN=131072" invoked in CLI without success!

avantgarden 19 March 2023 02:01

Some progress...

Serving services over unpriviledged ports seems to fix the issue.

By the way... AmiTcp "services file" won't honor ports numbers specified!

It just ignores the directive:

telnet 1023/tcp

and goes on serving telnet on 23/tcp.

What's wrong with my "services" config??

So...

newshell TCP:1023

kinda works... It won't crash fs-uae!

But with known limitations, e.g. having to add ";" at line end to interact.

avantgarden 19 March 2023 11:58

Disregard above post!

newshell TCP:23

works OK!

What remains to be sorted out is why the VERY SAME setup works on WinUAE while it crashes FS-UAE.

(same DH0: folder, same Kickstart, bsdsocket_library = 1)

avantgarden 25 March 2023 12:00

Solved!!!
 
Thanks Patrik for putting me on the right track!

Offending code was on guest side.

I replaced "inetd" binary with a more recent one and problem disappeared.

Original - crashing - inetd downloaded from:
http://aminet.net/package/comm/net/AmiTCP-bin-30b2

Working inetd downloaded from:
http://aminet.net/package/comm/tcp/AmiTCP-demo-40

Thanks again Patrik :)

patrik 25 March 2023 23:46

Cheers! :) Good work finding the problem!


All times are GMT +2. The time now is 21:42.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04148 seconds with 11 queries