5th Underhanded C Contest Now Open
Xcott Craver writes "The next Underhanded C Contest has begun, with a deadline of March 1st. The object of the contest is to write short, readable, clear and innocent C code that somehow commits an evil act. This year's challenge: write a luggage routing program that mysteriously misroutes a customer's bag if a check-in clerk places just the right kind of text in a comment field. The prize is a gift certificate to ThinkGeek.com."
This year's challenge: write a luggage routing program that mysteriously misroutes a customer's bag if a check-in clerk places just the right kind of text in a comment field.
All participants will also receive complimentary cavity-searches at airport checkpoints.
#fuckbeta #iamslashdot #dicemustdie
Someone who works at any major airline can just submit the real production code they use for luggage routing and win the contest for sure!
| This year's challenge: write a luggage routing program that mysteriously misroutes a customer's bag if a check-in clerk places just the right kind of text in a comment field.
What, we actually need to write code for something that happens by nature?
I don't have the time for something like this, but it seems to me a good possibility would be to have all of your inputs that the clerk fills out be contiguous in memory, including the destination, have the algorithm to figure out what destination to go to scan through the whole destination string looking for matches (rather than looking for an exact match) and taking the last one it finds, and have a broken bounds check for the length of that string so that the algorithm looks into the comments section as well.
So, for example, if the clerk fills out the destination as "LAX" but writes in the comments section, "Do not confuse his bags with those owned by CID who is also going to a different final destination; they're very similar looking.", the bags would be routed to Cedar Rapids (CID) instead of Los Angeles (LAX).
As it says in the Constitution, Lenin is in my shower.
*Way* more deceptive. The default value for the destination field? It's supposed to look innocent - an innocent program would note that you left out a destination and prompt you to enter one. Any basic debugging done by someone else would turn this up. What they want is for you to leave a "comment" like "this package is top-heavy" (in a field designed for such comments) that changes the destination, but in a way such that someone reading the source code wouldn't realize anything was happening at all much what that you were changing the destination. Also such that whoever entered the text wouldn't obviously be at fault.
a luggage routing program that mysteriously misroutes a customer's bag
sounds like Delta is looking for new programmers
I've read the entire blog, and I must say, I'm impressed. Very impressed. Very, very impressed.
The person who writes the criteria knows what he's/she's writing about.
And the winners who submit the results are really, really good.
I was going to say, don't forget Perl programmers, but then I remembered the legibility requirement.
If you manage to get this into the GNU/Linux Kernel, you get a job at the NSA.
Write short, readable, perfectly innocent looking C code, that somehow commits an evil act under certain circumstances.
After logging in slashdot still does not take you back to the page you were on. It's been that way for 20 years.
The true "Underhanded" program would be one that was perfectly readable, so readable in fact that you totally overlook the sneaky thing it was doing because what you think it's doing seems so clear.
The ObsfuC contest is all about code that even after staring you can't tell what the heck is going on.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
C motherfucker, do you speak it?!
Happy people make bad consumers.
I am the winner of the previous underhanded C contest. If anyone is interested, I wrote up a description of my entry on my blog here: http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction
It was a fun contest to enter and now I can shop at thinkgeek for silly gadgets without feeling guitly :)
http://notanumber.net/