Archive for the ‘Uncategorized’ Category

The Linux year 2038 bug

I guess all of u know bout Y2K the infamous time dependent bug . The bug did not result in any major problem as expected and most machines would continue operating as usual through the century turnover, with the worst result being an incorrect date . Now there is another bug “Year 2038 bug ” targeting linux users .

What is year 2038 bug?

Most UNIX , Linux and other *nix based OS are written in ANSI C language . And if you are a C programmer , you probably know that in C you use 32-bit data type ‘time_t’ which stores time , and the mechanism for doing this is very simple . It converts the complete date into seconds and saves the value into it . The time starts from 1st jan 1970 00:00 hrs GMT . This means according to the counter the value of 1st jan 1970 1:00 AM will be saved as ‘3600’ into the variable.

Since time_t is a 32-bit data type , it has 32 memory units of which can have a value of 0 or 1 . As the first bit is used for storing weather the value is positive or negative , there are 31 bits left. The maximum value a 31-bit variable can take is 2^31 -1 , which is equal to ‘2147483648’ , meaning the data type can store 2147483648 seconds starting from 1st jan 1970 00:00:00 hrs . This means it can store date up to 03:14:07 Tuesday, January 19, 2038 . Times beyond this moment will “wrap around” and be represented internally as a negative number, and cause programs to fail, since they will see these times not as being in 2038 but rather in 1970 or 1901, depending on the implementation. Erroneous calculations and decisions may therefore result .

How dangerous is it?

To get an idea how dangerous it can be , do a small test (the output of this test will crash your GNOME environment) . Go to your linux machine , restart it and enter BIOS . Set the time to anything beyond 03:14:07 Tuesday, January 19, 2038 , save and restart the machine . When your Linux machine starts up , you will find that GNOME refuses to start up and will show some error messages . If you move to the command line and run the ‘top’ command , you will find some applications such as xscreensaver have gone to infinity loop and occupy the full processing power .

So what do you do about this problem?

By 2038 most implementations would have migrated to 64 bit . But saying that 2038 is far away is not the solution . Think of all the devices that are embedded with Linux . If a hacker manages to get into these devices and simply change the date to 2039 , the device will start to malfunctioning .Or a spammer could send out a mail with a malicious code that generates a fake time stamp of year 2039 and cause a Linux mail server to crash.

Advertisements

Useful RUN Commands

To Access – Run Command

1. click start
2. write one of the following

Accessibility Controls – access.cpl
Add Hardware Wizard – hdwwiz.cpl
Add/Remove Programs – appwiz.cpl
Administrative Tools – control admintools
Automatic Updates – wuaucpl.cpl
Bluetooth Transfer Wizard – fsquirt
Calculator – calc
Certificate Manager – certmgr.msc
Character Map – charmap
Check Disk Utility – chkdsk
Clipboard Viewer – clipbrd
Command Prompt – cmd
Component Services – dcomcnfg
Computer Management – compmgmt.msc
Date and Time Properties – timedate.cpl
DDE Shares – ddeshare
Device Manager – devmgmt.msc
Direct X Control Panel (If Installed)* – directx.cpl
Direct X Troubleshooter – dxdiag
Disk Cleanup Utility – cleanmgr
Disk Defragment – dfrg.msc
Disk Management – diskmgmt.msc
Disk Partition Manager – diskpart
Display Properties – control desktop
Display Properties – desk.cpl
Display Properties (w/Appearance Tab Preselected) – control color
Dr. Watson System Troubleshooting Utility – drwtsn32
Driver Verifier Utility – verifier
Event Viewer – eventvwr.msc
File Signature Verification Tool – sigverif
Findfast – findfast.cpl
Folders Properties – control folders
Fonts – control fonts
Fonts Folder – fonts
Free Cell Card Game – freecell
Game Controllers – joy.cpl
Group Policy Editor (XP Prof) – gpedit.msc
Hearts Card Game – mshearts
Iexpress Wizard – iexpress
Indexing Service – ciadv.msc
Internet Properties – inetcpl.cpl
IP Configuration (Display Connection Configuration) – ipconfig /all
IP Configuration (Display DNS Cache Contents) – ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents) – ipconfig /flushdns
IP Configuration (Release All Connections) – ipconfig /release
IP Configuration (Renew All Connections) – ipconfig /renew
IP Configuration (Refreshes DHCP & Re – Registers DNS) –
ipconfig /registerdns
IP Configuration (Display DHCP Class ID) – ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID) – ipconfig /setclassid
Keyboard Properties – control keyboard
Local Security Settings – secpol.msc
Local Users and Groups – lusrmgr.msc
Logs You Out Of Windows – logoff
Microsoft Chat – winchat
Minesweeper Game – winmine
Mouse Properties – control mouse
Mouse Properties – main.cpl
Notepad – notepad
Nview Desktop Manager (If Installed) – nvtuicpl.cpl
Object Packager – packager
ODBC Data Source Administrator – odbccp32.cpl
On Screen Keyboard – osk
Password Properties – password.cpl
Performance Monitor – perfmon.msc
Performance Monitor – perfmon
Phone and Modem Options – telephon.cpl
Power Configuration – powercfg.cpl
Printers and Faxes – control printers
Printers Folder – printers
Private Character Editor – eudcedit
Quicktime (If Installed) – QuickTime.cpl
Regional Settings – intl.cpl
Registry Editor – regedit
Registry Editor – regedit32
Remote Desktop – mstsc
Removable Storage – ntmsmgr.msc
Removable Storage Operator Requests – ntmsoprq.msc
Resultant Set of Policy (XP Prof) – rsop.msc
Scanners and Cameras – sticpl.cpl
Scheduled Tasks – control schedtasks
Security Center – wscui.cpl
Services – services.msc
Shared Folders – fsmgmt.msc
Shuts Down Windows – shutdown
Sounds and Audio – mmsys.cpl
Spider Solitare Card Game – spider
SQL Client Configuration – cliconfg
System Configuration Editor – sysedit
System Configuration Utility – msconfig
System File Checker Utility (Scan Immediately) – sfc /scannow
System File Checker Utility (Scan Once At Next Boot) – sfc /scanonce
System File Checker Utility (Scan On Every Boot) – sfc /scanboot
System File Checker Utility (Return to Default Setting) – sfc /revert
System File Checker Utility (Purge File Cache) – sfc /purgecache
Anonymous 9/28/06 System File Checker Utility (Set Cache Size to size x) –
sfc /cachesize=x
System Properties – sysdm.cpl
Task Manager – taskmgr
Telnet Client – telnet
User Account Management – nusrmgr.cpl
Utility Manager – utilman
Windows Firewall – firewall.cpl
Windows Magnifier – magnify
Windows Management Infrastructure – wmimgmt.msc
Windows System Security Tool – syskey
Windows Update Launches – wupdmgr
Windows XP Tour Wizard – tourstart
Wordpad – write