bugFreeciv - Bugs: bug #21279, Unit info erroneously sent to...

 
 
Show feedback again

bug #21279: Unit info erroneously sent to detached clients during combat, crashing them

Submitted by:  None
Submitted on:  Sat 16 Nov 2013 08:59:56 PM UTC  
 
Category: NoneSeverity: 4 - Important
Priority: 5 - NormalStatus: Fixed
Assigned to: Jacob Nevins <jtn>Originator Email: -unavailable-
Open/Closed: ClosedRelease: 2.4.0
Operating System: AnyPlanned Release: 2.4.2,2.5.0,2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 14 Jan 2014 12:25:26 AM UTC, comment #14:

> How do we make the client robust about this? [...]

This is now bug #21473.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Mon 13 Jan 2014 11:36:15 PM UTC, SVN revision 24132:

Do not send unit info to detached connections during combat.
It's an information leak, and can cause clients to crash.

See gna bug #21279.

(Browse SVN revision 24132)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Mon 13 Jan 2014 11:24:30 PM UTC, SVN revision 24128:

Do not send unit info to detached connections during combat.
It's an information leak, and can cause clients to crash.

See gna bug #21279.

(Browse SVN revision 24128)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Mon 13 Jan 2014 11:16:20 PM UTC, SVN revision 24124:

Do not send unit info to detached connections during combat.
It's an information leak, and can cause clients to crash.

See gna bug #21279.

(Browse SVN revision 24124)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 11 Jan 2014 03:40:12 PM UTC, comment #10:

Thank you Jacob, patch applied to ns0.it. (not live on all server instances)

Davide Baldini <davide_at_debian>
Sat 11 Jan 2014 02:15:50 PM UTC, comment #9:

...and with the obvious trivial patch, a detached client survives combat.

(Patch attached in case server operators want to apply it immediately, in advance of a new release.)

(file #19726)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 11 Jan 2014 02:09:56 PM UTC, comment #8:

Reproduced crash with similar backtrace on combat under controlled conditions. So while I don't have conclusive proof that's what triggered it on the public server, I'm pretty confident.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 11 Jan 2014 01:45:55 PM UTC, comment #7:

...and indeed the code is different on S2_3. Looks like the attempt to let global observers see combat was added in patch #2742 as part of the unit orientation patches, but didn't include a check for global-observer-ness.

The server-side fix should be simple.
How do we make the client robust about this? It would be nice if it complained about seeing things like unit updates while lacking the rest of the game state -- we might have spotted the cause sooner if so. Do we have a strong enough notion of what packets clients "should" receive while detached to implement this reliably?

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 11 Jan 2014 01:39:35 PM UTC, comment #6:

see_combat() looks like it might send unit info to detached connections...

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 11 Jan 2014 01:26:52 PM UTC, comment #5:

Should a detached connection be receiving unit packets? Surely not, that's an information leak?

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 11 Jan 2014 01:24:02 PM UTC, comment #4:

Reproduced crash with 2.4.0 on Linux while connected to running server freeciv-debian.ns0.it with 2 active human players.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sun 01 Dec 2013 03:46:50 PM UTC, comment #3:

I observed the same problem and it indifferently affects Windows or Linux clients version 2.4.0. This did not affect 2.3.4. I don't know for 2.4.1.

I suspect the probability of hitting the bug depends on the activity of the server, especially regarding private chatting between users.
This does not affect the server itself, which just reports a "client disconnected", but only segfaults the client.

If more clients are detached at the same time inside an actively running server, when one client crashes the others don't do immediately, but may crash after a few seconds.
Attached or observing clients are not affected.

I spotted this defect on other servers beside freeciv-debian.ns0.it.

Davide Baldini <davide_at_debian>
Sun 17 Nov 2013 11:58:44 AM UTC, comment #2:

It's the release version of 2.4.0. Compiled on debian, but others have had the bug on Windows.

I've noticed it happens most frequently when connecting the freeciv-debian.ns0.it internet servers.

Anonymous
Sun 17 Nov 2013 11:30:49 AM UTC, comment #1:

Which version is this? 2.4.0, or one of the betas/RCs?

I just tried reproducing by connecting two clients to a server, starting the game, connecting a third client in "detached" state, and playing through 40 turns. No luck.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 16 Nov 2013 08:59:56 PM UTC, original submission:

When logged in to a server (only tested with running, not sure about pre-game), but not attached or observing, there is a large probability of a client crash.

Once you observe or attach, the client is stable.

Anonymous

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #19726:  S2_4-combat-no-detached.patch added by jtn (480B - text/x-diff - S2_4 r24096 (probably applies to trunk/S2_5 too))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by davide_at_debian (Posted a comment)
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 12 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 13 Jan 2014 11:37:18 PM UTCjtnStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Sun 12 Jan 2014 02:10:48 AM UTCjtnCategoryclient-gtk-2.0=>None
      StatusConfirmed=>Ready For Test
      Assigned toNone=>jtn
      Operating SystemGNU/Linux=>Any
      SummaryFreeciv 2.4 client gtk2 crashes when detached=>Unit info erroneously sent to detached clients during combat, crashing them
    Sat 11 Jan 2014 02:15:50 PM UTCjtnAttached File-=>Added S2_4-combat-no-detached.patch, #19726
    Sat 11 Jan 2014 01:51:47 PM UTCjtnSeverity3 - Normal=>4 - Important
      StatusNone=>Confirmed
      Planned Release=>2.4.2,2.5.0,2.6.0
    Sat 23 Nov 2013 11:32:32 AM UTCjtnRelease=>2.4.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup