Time Nick Message 00:00 Pexin I started programming too late in life and now my brain is stale. I deeply wish I knew more about web security 00:00 erlehmann oh i meant minetest not web servers lol 00:00 Pexin I meant web servers >:] 00:01 Pexin and I know nothing at all about the lua env 00:02 erlehmann well it's not a particularly safe thing rn, to start with that 00:03 erlehmann i still wonder what was up with that one anvil formspec i encountered on a server where some previous user named an item std::unique_ptr 00:03 erlehmann probably a troll 00:05 erlehmann i should name a sword std::unique_ptr hehe 00:33 MTDiscord the most annoying thing about working with audio in minetest, is verifying if its your codes issue, or audio crapped out again and you need to restart minetest 00:37 Pexin when I'm running MT and my display goes to sleep, sometimes when I come back I get a burst of, I guess queued sounds in pulse or something. but sometimes I have no sound at all, until I open pavucontrol then it suddenly comes back 00:39 MTDiscord windows is where i have issues, when using linux, not having many so far 02:22 AliasAlreadyTake Yay, two new crashes :D 02:22 AliasAlreadyTake One on the live server, one on the testserver 02:26 AliasAlreadyTake This one again: minetestserver: /home/mtlive1/5.4.1/Minetest_live/src/inventorymanager.cpp:304: virtual void IMoveAction::apply(InventoryManager*, ServerActiveObject*, IGameDef*): Assertion `move_count <= count' failed. 02:46 AliasAlreadyTake https://pastebin.com/NYw5eNBn 06:37 jason1234 there is a a new game. alike minecraft 06:37 jason1234 is that valeron ? 06:37 jason1234 with housing and smoke and flying possibility actually gliding 06:42 erlehmann veloren? 07:24 MTDiscord Line 239 - 249 are juicy 07:26 AliasAlreadyTake You mean because of the python thingy? 07:26 MTDiscord No, not because of that 07:27 MTDiscord old_to_i = -1 sticks out in particular 07:27 MTDiscord Because an index should never be negative 07:28 MTDiscord I could see this being caused by a hacked client 07:29 MTDiscord IMoveAction parsing parses to_i = stoi(ts); as a signed integer 07:31 AliasAlreadyTake inventorymanager.h:144: s16 to_i = -1; 07:32 erlehmann luatic AliasAlreadyTake could there be a dupe opportunity here? 07:32 erlehmann i'd love a new dupe 07:32 MTDiscord There could definitely be lots of opportunities here 07:32 MTDiscord First of all, I notice that the bounds check needs to be moved uo 07:33 MTDiscord up* 07:33 erlehmann which one? 07:34 AliasAlreadyTake I would not have the slightest clue ... if you wish to test stuff, I'll start the testserver 07:36 MTDiscord This is also interesting: src_can_take_count = 1433384998, dst_can_put_count = 32767 07:37 AliasAlreadyTake Or maybe std::unordered_map with 93825077154864 elements ? 07:37 AliasAlreadyTake That's a whole lot isn't it? 07:38 MTDiscord Yeah that's indeed very odd 07:38 MTDiscord allow_swap = 244 - WHAT? allow_swap is a boolean 07:39 MTDiscord I don't trust these values 07:40 AliasAlreadyTake Who knows where from those values are read :P 07:41 erlehmann src_can_take_count = 1433384998 07:41 erlehmann lel 07:41 MTDiscord saliva production on the rise as hack client devs suspect a new dupe 07:41 erlehmann AliasAlreadyTake could you compile the test server with ubsan or asan maybe? 07:42 erlehmann it will become dog slow 07:42 erlehmann but if this is the result of a buffer overflow or similar, you may be able to find it that way 07:43 AliasAlreadyTake On the testserver I don't mind it being slow. I don't know how to compile it with those ... thingies? 07:44 AliasAlreadyTake But since we do not have a 100% repro and the issue crops up only during whatever people do on the server, it might take a while until we get a reading 07:44 AliasAlreadyTake If at all - my imagination is limited in contrast to the players' 07:44 erlehmann try this: cmake '-DRUN_IN_PLACE=1' '-DCMAKE_CXX_FLAGS=-g -fsanitize=address -fno-omit-frame-pointer' && make && ./bin/minetest 07:45 AliasAlreadyTake wilco 07:45 erlehmann ? 07:45 erlehmann what does “wilco” mean 07:45 erlehmann ??? 07:46 erlehmann AliasAlreadyTake if there is any memory fuckery going on, asan will give you exact information about this, even without a crash 07:46 AliasAlreadyTake Means will comply. I don't know, what's the usual term for that? 07:46 erlehmann since minetest is full of bugs that asan can detect, you can probably see 1 or 2 within startup 07:47 erlehmann ah 07:47 erlehmann if it *does not* start up, you might need to ignore some errors 07:47 erlehmann let me look it up 07:49 erlehmann AliasAlreadyTake, ok to be clear: it is possible that minetest will crash on startup with this option, send me the trace then so i can tell it to not do that 07:52 AliasAlreadyTake Alright, it's building. Is there any way I can check all those options are considered? Like somewhere in CMakeCache? 07:53 erlehmann you'll see it complaining about things within minutes if this works 07:54 erlehmann i.e. minetest has enough bugs that asan can find 07:54 AliasAlreadyTake Ok. I would start the server normally, without gdb? 07:55 erlehmann yeah, but later you can do in gdb: break __asan_on_error@plt 07:55 erlehmann i mean 07:55 erlehmann you can start it under gdb for all i know 07:55 erlehmann but it will not help 07:55 erlehmann right now 07:55 erlehmann if asan finds anything it will be good enough 07:56 erlehmann and show up in the logs anyway 07:57 erlehmann AliasAlreadyTake you can probably inspect the binary like this https://github.com/google/sanitizers/issues/1051#issuecomment-499372056 07:59 AliasAlreadyTake 20% done. It's hellish slow compared to normal builds. Is that *normal* ? 08:00 erlehmann you are building a debug build with an address sanitizer, it is literally instrumenting everything to check for memory related fuckups 08:00 erlehmann it told you it is dog slow 08:01 erlehmann it will run ok though 08:01 erlehmann like playable 08:01 erlehmann or so i hope lol 08:03 erlehmann AliasAlreadyTake https://en.wikipedia.org/wiki/AddressSanitizer 08:03 erlehmann AliasAlreadyTake the wikipedia article shows example output, pls go look at it 08:04 AliasAlreadyTake I've seen this before, but can't remember much. I'm old :P My C++ times are way back and then some 08:23 AliasAlreadyTake The testserver is up and running, I didn't see much difference to a normal start. Should I try what they did in the github comment to make sure? 08:23 AliasAlreadyTake Or is there any other way to prove to myself it's compiled right? 08:25 erlehmann mhhh 08:26 erlehmann AliasAlreadyTake note the github comment is for ubsan, but yes, checking the symbols might help 08:26 erlehmann AliasAlreadyTake maybe you can just tell me where to connect to 08:27 AliasAlreadyTake address is your-land.de port 30001 08:30 erlehmann connecting rn 08:39 erlehmann AliasAlreadyTake, sorry i had connected with an instrumented client myself that was dog slow lol 08:39 erlehmann AliasAlreadyTake i will recompile 08:39 erlehmann AliasAlreadyTake, then connect again 08:39 erlehmann AliasAlreadyTake saw any funny output on stderr? 08:40 AliasAlreadyTake No, nothing unusual. 08:41 AliasAlreadyTake Maybe the way I start it doesn't capture stderr? "nohup $PATH_TO_EXECUTABLE >> $SERVICE_NAME.out 2>&1&" 08:45 erlehmann uh 08:50 erlehmann AliasAlreadyTake i think you should do this, but it most likely does not matter “2>&1&” → “2>&1 &” 08:51 erlehmann $ unlink /tmp/log; nohup sh -c 'echo stderr >&2' >> /tmp/log 2>&1& ; sleep 1; cat /tmp/log 08:51 erlehmann dash: 14: Syntax error: ";" unexpected 08:52 erlehmann hmmm 08:54 erlehmann $ unlink /tmp/log; : |nohup sh -c 'printf 1 >&1; printf 2 >&2;' >>/tmp/log 2>&1 08:54 erlehmann $ cat /tmp/log 08:54 erlehmann 12$ 08:54 erlehmann seems to work 09:03 erlehmann AliasAlreadyTake, easy way to check out if it compiled with asan, you should not be able to join a server unless you start minetest with 'ASAN_OPTIONS=alloc_dealloc_mismatch=0', bc it will crash on connecting 09:05 AliasAlreadyTake Then I didn't do it right, because I'm on the server with a normal 5.5.50 client 09:05 erlehmann no no 09:05 erlehmann try compiling a *client* with that 09:06 erlehmann it will not be able to join any server 09:06 AliasAlreadyTake Oh. I thought I should have compiled the server with that :D 09:06 erlehmann yes ofc 09:06 erlehmann the server is probably alright 09:06 AliasAlreadyTake But I don#t see any different in the logs? 09:06 erlehmann AliasAlreadyTake, btw, bug: if i hit you with my sword but pvp is disabled, the sword still loses durability 09:06 erlehmann AliasAlreadyTake, that means you have not encountered any memory bugs 09:06 erlehmann it is a good thing tbh 09:07 AliasAlreadyTake :D There's a /bug command where you can report such oddities ... you get an ingame mail about where the bug report goes to :P 09:28 erlehmann AliasAlreadyTake, i just told you. so … got any asan errors? 09:29 AliasAlreadyTake Yes, a couple. Will upload 09:29 AliasAlreadyTake https://pastebin.com/GCBDV2t5 09:30 erlehmann heap-use-after-free → hey can we turn that into the new client-sent server side mods feature? 09:30 erlehmann after all they disabled the old one 09:34 erlehmann AliasAlreadyTake, if you know gdb i guess you can break on this and figure out how to exploit it right? 09:35 AliasAlreadyTake Not really. My C++ is ages old, I got the gdb command from sfan5 09:35 erlehmann maybe sfan5 can figure out what happens there then 09:36 AliasAlreadyTake The error I used to crash the server is not the one that crashes the live server 09:36 erlehmann yes but this is a bug regardless 09:37 erlehmann AliasAlreadyTake https://en.wikipedia.org/wiki/Dangling_pointer 09:38 erlehmann > When a dangling pointer is used after it has been freed without allocating a new chunk of memory to it, this becomes known as a "use after free" vulnerability. 09:41 AliasAlreadyTake Hm. It's worth a try, upon next live server crash I'll compile those in? 09:49 erlehmann no idea how slow it will make the server 09:49 erlehmann but ig you might find bugs that way 09:52 AliasAlreadyTake Thanks :) The more I know, the more likely I will find stuff. But I guess without you guys I'm still lost on the one I am facing onj the liveserver 12:43 MinetestBot 02[git] 04sfan5 -> 03minetest/minetest: Fix broken handling of NodemetaChanged packets 13b480a3e https://git.io/JuPCj (152021-09-12T12:42:01Z) 13:19 MTDiscord Is there some reason why particles don't/shouldn't have use_texture_alpha? It seems they're always de facto set at "blend" and this causes problems with other alpha-blend things like liquids. 13:37 erlehmann the tga thing seems to work locally 13:37 MTDiscord Correct rendering would have to first render everything opaque - nodes, particles and entities - and then render everything semi-transparent, Z-sorted per triangle (possibly even splitting tris in the case of intersection). 13:38 MTDiscord The current rendering first renders mapblocks - which contain both opaque and semitransparent blocks - and then renders particles, entities etc. after that. 13:39 erlehmann i still get texture errors on catlandia though, lets see what those are 13:39 MTDiscord The PR by x2048 introduces Z-sorting at a mapblock level, but can't really fix this issue. 13:39 sfan5 irrlicht defines some sort of solid and transparent pass but it doesn't seem we're using it correctly or at all 13:40 erlehmann to be clear, they do not seem to be tga related 13:40 erlehmann either catlandia does something wrong or something else broke 13:42 MTDiscord are there any log messages related to it? 13:43 erlehmann https://mister-muffin.de/p/S426.txt 13:50 MTDiscord Really, a proper solution would have to sort at a triangle level. Order-independent transparency would probably the simplest to implement, but also pretty slow. 13:50 MTDiscord erlehmann: that very much looks like Catlandia messing up 13:51 MTDiscord The changes shouldn't affect PNGs 13:51 MTDiscord Also there's HTML escaped colors with quotes!? 13:55 erlehmann luatic it looks to me either skinsdb is in error here or minetest used at some point to do xml 13:58 erlehmann wait 13:58 erlehmann minetest uses xml 13:58 erlehmann for fonts 13:58 erlehmann lol 14:00 MTDiscord well xml stuff was removed from irrlichtmt a while ago 14:01 erlehmann oh what the fuck 14:01 erlehmann xml is used for fonts 14:01 MTDiscord I guess they forgot to remove the XML font files then 14:01 MTDiscord erlehmann: probably XML is just a fallback 14:01 erlehmann what kind of mess is this, are thed devs just removing features for the sake of removing them? 14:01 MTDiscord you sure it's not just freetype handling the xml font files? 14:02 MTDiscord Pretty sure MT usually is compiled with Freetype which means TTF is used. 14:02 MTDiscord minetest uses freetype for fonts from what I can recall 14:04 erlehmann wellllllllllllll 14:04 erlehmann let me double check it 14:05 MTDiscord yeah this looks a bit weird 14:05 MTDiscord if freetype is not enabled when building minetest it falls back to irrlicht's font rendering which uses png and xml... which has been removed? 14:35 Guest75 I'm writing here simply because #minetest-dev is not talk-able from web IRC, but how would bitmap font work with complex writing for example?? unifont handles that as well and not just the normal strict 'latin-only' stuff since there's a whole lot writing scripts out there and latin is just very tiny portion of it 14:41 erlehmann Guest75 i have no idea 15:28 sfan5 @luatic do you have an idea or fix for the assertion failure Alias mentioned yesterday yet? 15:34 MTDiscord No, not yet 15:35 sfan5 was just wondering, no hurry 15:43 MTDiscord TBH I'm pretty much out of ideas 16:03 erlehmann did you know: if you use bitmap fonts, someone spamming the chat can not make your game lag so much 16:03 erlehmann unfortunately, that feature was recently removed from the dev version 16:04 erlehmann if you care about it or use it, please voice your opinion here https://github.com/minetest/minetest/issues/11611 16:05 Desour !title 16:05 MinetestBot No title found. 16:06 MTDiscord Remove (or preserve) non-TTF font support #11611 16:06 ShadowBot https://github.com/minetest/minetest/issues/11611 -- Remove (or preserve) non-TTF font support 17:57 AliasAlreadyTake Yay, anotehr crash, yaym a different one. This time only a lua problem. To be honest, I don't know what to do at this point. 17:59 Pexin become organic farmer 23:07 Extex I'm almost sure I've asked this before, but how do I get an entities name from an ObjectRef? 23:08 sfan5 :get_luaentity().name 23:09 Extex Ahh ty