IRC log for #bzflag on 20121202

00:51.02*** join/#bzflag Marzipan (~Marzipan@sign-4db606ab.pool.mediaWays.net)
01:41.52*** join/#bzflag ahs3- (~ahs3-@adsl-065-005-193-158.sip.rdu.bellsouth.net)
02:05.17*** join/#bzflag ruskie (ruskie@sourcemage/mage/ruskie)
03:40.16*** join/#bzflag Flash (~jwmelto@c-76-25-208-148.hsd1.co.comcast.net)
03:40.16*** join/#bzflag Flash (~jwmelto@bzflag/developer/Flash)
03:47.24*** join/#bzflag jeffm (~jeffm@76.167.236.199)
03:47.28*** join/#bzflag jeffm (~jeffm@unaffiliated/jeffm2501)
03:47.28*** mode/#bzflag [+v jeffm] by ChanServ
04:08.28blast007jeffm: I wasn't having luck getting the nVidia drivers working in Linux, but I might try again tomorrow.
04:08.40jeffmahh
04:09.11blast007dunno if it's just cuz the card is so new, or if Ubuntu just blows
04:12.13blast007open-source driver can barely run the UI, much less BZFlag (insta-crash when trying to run bz), and with the proprietary driver loaded it wouldn't bring up the unity
04:20.08sussudioi remember bzflag running fine on bzflag about 5 years ago... using a radeon aiw
04:24.11jeffmyou can try mint, ubuntu less suck
04:27.25jeffmlinux support is overtated
04:28.03jeffmit doesn't even support metro
04:40.08*** join/#bzflag jeffm (~jeffm@unaffiliated/jeffm2501)
04:40.08*** mode/#bzflag [+v jeffm] by ChanServ
04:41.52FlashJeff, I need to start over trying to build on Mac. What is the state of the current Xcode project?
04:42.27jeffmsame as it was before
04:42.34jeffmaka not useable
04:49.44jeffmI believe that the last build was made using the old way by hacking up a system to build like it used to
05:15.07*** join/#bzflag Deadalot (~philb@71.55.20.159)
05:59.22Flashit shows calling joinGame from nboUnpackString.. don't see how that can happen
06:00.02Flashstupid client.. reviewing: here is an odd stack trace from apocalypse: http://flash.pastebin.ca/2262418
06:01.18Flashso I'm thinking memory corruption
06:01.40Flashbut it's really hard to test on this new machine until I can make it build
06:03.37jeffmyeah we have come to the memory corruption conclusion as well
06:03.49jeffmall the stack traces are atop late
06:03.58jeffmtoo late
06:04.10FlashI found a potential memory overrun in playing, but I don't want to check it in without SOME testing
06:04.18Flashat LEAST a compile, for crying out loud
06:04.29jeffmwhat dod you find?
06:05.15Flashhttp://flash.pastebin.ca/2262419
06:05.44Flashit's possible for the server to send a string longer than the client can accept
06:06.06jeffmsure, that looks like a safe thing to check in
06:06.12jeffmhow would the server send it tho?
06:06.23jeffmwe'd want to fix it there
06:07.32Flashmy strong suspicion is that the team switch plugin is sending something, and I don't have any insight into what that is doing
06:08.06jeffmwhat message is sending it?
06:08.11Flashdon't know
06:08.32jeffmwe should probably protect the pack as well
06:08.52FlashI do know that they disable the team switch for a while and it was pretty stable
06:09.45jeffmstill the plugin doesn't send a message directly, it has to call an API that eventually does the pack
06:09.52jeffmso we should protect that pack
06:12.27Flashthe packs appear to be length agnostic. The vulnerability is in the client unpacking to a fixed length buffer
06:13.06jeffmwe should not pack a string into a fixed size buffer
06:13.28Flashhaven't proved that yet, but we are Unpacking to a fixed size buffer
06:13.30jeffmfixed size buffers should have fixed sized strings :)
06:13.49jeffmhmm
06:14.27jeffmwell you are closer then anyone else
06:14.35jeffmjust infall a real OS and you'll be fine :)
06:15.03Flashok, we ARE packing to a fixed length buffer
06:15.45jeffmthen we should just check to make sure that the message we get is the right size
06:20.19jeffmwhat API function does team change call that may be sent with a bad length?
06:20.33FlashI have no idea
06:20.53FlashSince my stack trace is dealing with corrupted memory, there's no reason to trust it at all
06:21.19jeffmthere is no reason to trust any code at that point :)
06:21.37FlashI searched for all the unpackString calls, and the most likely offender I can think of is a URL that could be long (but longer than 1k?)
06:22.13jeffmmake the packer not accept a string longer then 1 k
06:23.32Flashactually, it needs to be a bit less, because the protocol includes some binary data in every message, so not all strings can be the max length
06:24.00jeffmok, "some limit" :)
06:24.14jeffmthere are no real valid reasons to send data that large
06:24.51jeffmDifferent OSs have different max packet sizes too
06:25.10Flashrather than a static memory area, it would be better to use a std::vector<char> and size it as required to pack and unpack
06:25.37jeffmbyte not char but yes a dynamic buffer is better, slower but better
06:25.53Flashis "byte" a type?
06:25.54jeffmyou'd want to preallocate in chunks
06:26.02jeffmit should be
06:26.13jeffmchar is signed, you want the unsigned one, there is a ubyte_8 I think
06:26.14Flashit didn't use to be
06:26.28jeffmIIRC it was added in one of the C++ revs
06:26.35jeffmunsigned char would work too
06:26.54Flashprobably 0X (which is just now becoming more widely available)
06:27.12jeffmyou mean 11
06:27.16jeffmbut no it was before that IIRC
06:27.54Flashin any event, I'm not messing with anything until I get an environment where I can do minimal testing.
06:28.12jeffmit should be fixable with out redoing the entire message buffer system
06:28.20jeffmoptimally we want this to be a server fix
06:28.30jeffmeven if that means cutting off some messages
06:28.52FlashI agree that the server shouldn't send anything the client isn't expecting but the client should protect itself as well
06:29.07jeffmsure, both ends should be secured
06:29.32jeffmoptimally we'd have a buffer class that was used on both sides that never let it do an overrun
06:29.44jeffmand it could then dynamically allocate what it needed on pack and read
06:31.03jeffmI helve the c identifier for a byte is uint8_t
06:31.07jeffmfyi :)
06:31.58jeffmadded in c99
06:31.58Flashthat's not really a type; it's a typedef
06:32.09jeffmsure
06:32.18jeffmthat you can use like a type
06:32.22jeffmhence the 'def' ;)
06:32.24Flashagreed
06:32.47jeffmand it's always the same size on all bitnesses
06:33.13jeffmIIRC int can be 64 bits on itaiium 64 and some other rare platforms
06:33.36Flashint is explicitly undefined length, but char is not
06:33.53jeffmyeah, the only prob with char is it's signed
06:34.09jeffmtho no mater what you are casting at some point
06:34.17Flashas far as allocating a byte of memory, the sign doesn't matter
06:34.22jeffmyeah
06:34.29jeffmjust makes some of it harder to read in the debuger
06:34.42Flashand there is most certainly casting aplenty in the messaging
06:34.53jeffmyeah a class would be best
06:34.59jeffmthen it'd protect itself on both ends
06:35.03jeffmthat's how I've always done it
06:35.15jeffmit cold also build up large messages from multiple packets
06:36.18FlashI'll take another tilt at Xcode, perhaps tomorrow. Or, I might even fire up this old PC and try to get linux on it
06:36.47jeffmbootcamp your mac :)
06:37.02jeffmthe new Xcode project needs a huge amount of work
06:37.10jeffmthen existing one just calls the command line stuff
06:38.37jeffmI believe the only way to get the command line stuff to build is use an old OS/xcode or hack up your machine to include/use the tools/libs that are missing
07:09.40*** join/#bzflag jeffm (~jeffm@cpe-76-167-236-199.socal.res.rr.com)
07:09.41*** join/#bzflag jeffm (~jeffm@unaffiliated/jeffm2501)
07:09.41*** mode/#bzflag [+v jeffm] by ChanServ
07:40.54*** join/#bzflag ashvala (~ashvala@unaffiliated/ashvala)
07:50.44blast007sussudio: bzflag runs fine on linux.  it's just that linux doesn't run fine.  ;)
07:51.50blast007X was crashing just from opening/closing windows
07:55.27sussudioblast007: X isn't linux
07:55.57blast007oh, are you gonna be one of 'those people' that is all "linux is only the kernel!"
07:56.02sussudiowell, neither is the OS.
07:56.45sussudioblast007: i actually had the kernel keep running for a month when everything else segfaulted due to a cpu and a psu fan having failed... i only noticed when the pc case got really really hot
07:56.51blast007cuz I could just say that the kernel driver is foobar and making the graphics subsystem crash
08:11.45*** join/#bzflag I_Died_Once (~I_Died_On@unaffiliated/idiedonce/x-1828535)
08:29.08blast007sussudio: so what should I call it then?  GNU/Linux/X ?  ;)
08:29.40sussudioand whatever dist you're running it on
09:28.33*** part/#bzflag alezakos (~kongr45gp@unaffiliated/alezakos)
09:28.33*** join/#bzflag alezakos (~kongr45gp@unaffiliated/alezakos)
12:08.27*** join/#bzflag bier_ (~bier@p5085ECAF.dip.t-dialin.net)
12:08.36*** join/#bzflag bier (~bier@p5085ECAF.dip.t-dialin.net)
12:16.19*** join/#bzflag Pimpinella (~frank@gondolin.pimpi.org)
13:01.46*** join/#bzflag lvlinux (~n1gg@c-50-147-64-9.hsd1.tn.comcast.net)
14:18.25*** join/#bzflag sirquine (~quine@c-76-120-71-113.hsd1.co.comcast.net)
15:21.33*** join/#bzflag ahs3- (~ahs3-@adsl-065-005-193-158.sip.rdu.bellsouth.net)
17:04.59*** join/#bzflag jeffm (~jeffm@cpe-76-167-236-199.socal.res.rr.com)
17:04.59*** join/#bzflag jeffm (~jeffm@unaffiliated/jeffm2501)
17:04.59*** mode/#bzflag [+v jeffm] by ChanServ
19:01.33*** join/#bzflag swigg__ (~swigg@nsc69.38.101-238.newsouth.net)
19:03.31*** join/#bzflag meeba (~lamer@c-75-71-180-64.hsd1.co.comcast.net)
20:24.35*** join/#bzflag mmadia (~mmadia@pdpc/supporter/active/mmadia)
21:09.11*** join/#bzflag Pimpinella (~frank@gondolin.pimpi.org)
21:24.05*** part/#bzflag mmadia (~mmadia@pdpc/supporter/active/mmadia)
21:49.53*** join/#bzflag Delusional (~delusiona@unaffiliated/delusional)
23:05.53*** join/#bzflag catay (~smertens@kaiya.catay.be)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.