pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: minidlna buffer overflow on netbsd-8/amd64



On Sun, 27 Oct 2019, Martin Husemann wrote:

> Is there really a minidlna already running or is it confused by wrong
> permissions/user id or something?

I made sure there were no 'minidlnad' processes before starting each time.

> If no other instance is running, set a breakpoint on minidlna.c:1027 and
> find out why it gets there.

That shows more information but now it never seems to reach the breakpoint.
I get:

(gdb) break minidlna.c:1027
Breakpoint 1 at 0x407275: file minidlna.c, line 1027.
(gdb) run
Starting program: /usr/pkg/sbin/minidlnad -d -r -f /usr/pkg/etc/minidlna.conf
[2019/10/27 08:53:58] minidlna.c:517: warn: Unset locale
[2019/10/27 08:53:58] minidlna.c:525: debug: Using locale dir '/usr/share/locale' and locale langauge C/(null)
[2019/10/27 08:53:58] minidlna.c:1121: warn: Starting MiniDLNA version 1.2.1.
[2019/10/27 08:53:58] minidlna.c:393: warn: New media_dir detected; rebuilding...
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/Temporary Items
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/Temporary Items/0
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/Temporary Items/0/Temporary Items
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/Temporary Items/500
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/Temporary Items/500/Temporary Items
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/Temporary Items/500/TemporaryItems
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/Temporary Items/501
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/Temporary Items/501/Temporary Items
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/TheVolumeSettingsFolder
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 6
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/audio
[2019/10/27 08:53:58] minidlna.c:1181: warn: HTTP listening on port 8200
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 7
[2019/10/27 08:53:58] getifaddr.c:343: info: Enabling interface 192.168.17.242/255.255.255.0
[2019/10/27 08:53:58] minissdp.c:802: maxdebug: Sending ssdp:byebye [8]
[2019/10/27 08:53:58] minissdp.c:802: maxdebug: Sending ssdp:byebye [8]
[2019/10/27 08:53:58] minissdp.c:802: maxdebug: Sending ssdp:byebye [8]
[2019/10/27 08:53:58] minissdp.c:802: maxdebug: Sending ssdp:byebye [8]
[2019/10/27 08:53:58] minissdp.c:802: maxdebug: Sending ssdp:byebye [8]
[2019/10/27 08:53:58] minissdp.c:802: maxdebug: Sending ssdp:byebye [8]
[2019/10/27 08:53:58] minissdp.c:802: maxdebug: Sending ssdp:byebye [8]
[2019/10/27 08:53:58] minissdp.c:802: maxdebug: Sending ssdp:byebye [8]
[2019/10/27 08:53:58] minissdp.c:802: maxdebug: Sending ssdp:byebye [8]
[2019/10/27 08:53:58] minissdp.c:802: maxdebug: Sending ssdp:byebye [8]
[2019/10/27 08:53:58] minissdp.c:802: maxdebug: Sending ssdp:byebye [8]
[2019/10/27 08:53:58] minissdp.c:802: maxdebug: Sending ssdp:byebye [8]
[2019/10/27 08:53:58] minissdp.c:311: maxdebug: Sending ssdp:alive [8]
[2019/10/27 08:53:58] minissdp.c:311: maxdebug: Sending ssdp:alive [8]
[2019/10/27 08:53:58] minissdp.c:311: maxdebug: Sending ssdp:alive [8]
[2019/10/27 08:53:58] minissdp.c:311: maxdebug: Sending ssdp:alive [8]
[2019/10/27 08:53:58] minissdp.c:311: maxdebug: Sending ssdp:alive [8]
[2019/10/27 08:53:58] minissdp.c:311: maxdebug: Sending ssdp:alive [8]
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/audio/midi
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/audio/module
[2019/10/27 08:53:58] scanner.c:731: info: Scanning /r0/pub/audio/mp3
[2019/10/27 08:53:58] minissdp.c:311: maxdebug: Sending ssdp:alive [8]
[2019/10/27 08:53:58] minissdp.c:311: maxdebug: Sending ssdp:alive [8]
[2019/10/27 08:53:58] minissdp.c:311: maxdebug: Sending ssdp:alive [8]
[2019/10/27 08:53:58] minissdp.c:311: maxdebug: Sending ssdp:alive [8]
[2019/10/27 08:53:58] minissdp.c:311: maxdebug: Sending ssdp:alive [8]
[2019/10/27 08:53:58] minissdp.c:311: maxdebug: Sending ssdp:alive [8]
[2019/10/27 08:53:58] monitor_kqueue.c:288: debug: kqueue monitoring starting
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 9
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/home/tebaker/Public]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 10
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/home/jdbaker/Public]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 11
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 12
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/Temporary Items]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 13
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/Temporary Items/0]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 14
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/Temporary Items/0/Temporary Items]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 15
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/Temporary Items/500]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 16
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/Temporary Items/500/Temporary Items]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 17
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/Temporary Items/500/TemporaryItems]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 18
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/Temporary Items/501]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 19
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/Temporary Items/501/Temporary Items]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 20
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/TheVolumeSettingsFolder]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 21
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/audio]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 22
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/audio/midi]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 23
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/audio/module]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 24
[2019/10/27 08:53:58] monitor_kqueue.c:269: debug: kqueue add_watch [/r0/pub/audio/mp3]
[2019/10/27 08:53:58] kqueue.c:112: debug: kqueue_add 25
[2019/10/27 08:53:58] kqueue.c:200: debug: kevent timer: 1799051, changes: 19
[2019/10/27 08:54:13] kqueue.c:210: debug: kevent events: 1
[2019/10/27 08:54:13] kqueue.c:200: debug: kevent timer: 1784511, changes: 0
[2019/10/27 08:54:13] kqueue.c:210: debug: kevent events: 1
[2019/10/27 08:54:13] kqueue.c:200: debug: kevent timer: 1784511, changes: 0
[2019/10/27 08:54:13] kqueue.c:210: debug: kevent events: 1
[2019/10/27 08:54:13] kqueue.c:200: debug: kevent timer: 1784510, changes: 0
[2019/10/27 08:54:13] kqueue.c:210: debug: kevent events: 1
[2019/10/27 08:54:13] kqueue.c:200: debug: kevent timer: 1784510, changes: 0
[2019/10/27 08:54:20] kqueue.c:210: debug: kevent events: 1
[2019/10/27 08:54:20] kqueue.c:200: debug: kevent timer: 1777661, changes: 0
[2019/10/27 08:54:20] kqueue.c:210: debug: kevent events: 1
[2019/10/27 08:54:20] kqueue.c:200: debug: kevent timer: 1777660, changes: 0
[2019/10/27 08:54:20] kqueue.c:210: debug: kevent events: 1
[2019/10/27 08:54:20] kqueue.c:200: debug: kevent timer: 1777660, changes: 0
[2019/10/27 08:54:20] kqueue.c:210: debug: kevent events: 1
[2019/10/27 08:54:20] kqueue.c:200: debug: kevent timer: 1777659, changes: 0
[2019/10/27 08:54:21] kqueue.c:210: debug: kevent events: 1
[2019/10/27 08:54:21] minissdp.c:704: debug: SSDP M-SEARCH from 192.168.17.237:38204 ST: urn:dial-multiscreen-org:service:dial:1, MX: 1, MAN: "ssdp:discover"
[2019/10/27 08:54:21] kqueue.c:200: debug: kevent timer: 1776402, changes: 0
[2019/10/27 08:54:22] kqueue.c:210: debug: kevent events: 1
[2019/10/27 08:54:22] minissdp.c:704: debug: SSDP M-SEARCH from 192.168.17.237:38204 ST: urn:dial-multiscreen-org:service:dial:1, MX: 1, MAN: "ssdp:discover"
[2019/10/27 08:54:22] kqueue.c:200: debug: kevent timer: 1775401, changes: 0
[2019/10/27 08:54:23] kqueue.c:210: debug: kevent events: 1
[2019/10/27 08:54:23] minissdp.c:704: debug: SSDP M-SEARCH from 192.168.17.237:38204 ST: urn:dial-multiscreen-org:service:dial:1, MX: 1, MAN: "ssdp:discover"
[2019/10/27 08:54:23] kqueue.c:200: debug: kevent timer: 1774401, changes: 0
[2019/10/27 08:54:24] kqueue.c:210: debug: kevent events: 1
[2019/10/27 08:54:24] minissdp.c:704: debug: SSDP M-SEARCH from 192.168.17.237:38204 ST: urn:dial-multiscreen-org:service:dial:1, MX: 1, MAN: "ssdp:discover"
[2019/10/27 08:54:24] kqueue.c:200: debug: kevent timer: 1773400, changes: 0
[2019/10/27 08:54:36] kqueue.c:210: debug: kevent events: 1
[...]

After this, it periodically spews more "kevent timer" messages followed
by SSDP M-SEARCH messages from the same IP address shown.  (which is my
brother's machine running Linux Mint).

I never scans past what is shown above, nor adds more watch items past
what is shown above.  The "Temproary Items" directories are leftovers
from when I had MacOS X (10.4.11) machines running as primary workstations.
I don't anymore and likely won't ever again, so perhaps I should clean
those up.  They didn't cause any problems with minidlnad in the past
when it still worked properly (when I was using netbsd-7 on this machine?).

It seems not to reach the breakpoint this time.

-- 
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Home | Main Index | Thread Index | Old Index