h1

Protected with DEP and still able to print!

August 8, 2007

Vista busy cursor I now have a solution to the annoying problem I reported on 18 July, where I discovered that I could no longer print to my HP Deskjet 5550 once I turned on full Data Execution Prevention (DEP) to secure my PC against hackers attempting to exploit buffer overrun vulnerabilities.

hp deskjet 5550

By “full DEP” I mean the higher level of protection that blocks data execution in applications running on my PC, not just in components of Windows itself.

The problem arises because whoever programmed the HP print engine used some fancy tricks to squeeze the maximum performance out of the printer. I’m sure there’s some brilliant programmer in the US somewhere who goes to sleep every night with a warm smile on his face as he basks in the glory of the outrageously slick and inventive code he contrived in a flash of genius, to ensure that HP deskjets print pages at least 25ms faster than if the same coding project had been entrusted to an unimaginative journeyman clumsy oaf of a programmer instead.

Except that Mr Cleverclogs Programmer resorted to hacker-style coding tricks where some code executes in areas of memory intended for data, not program code. So DEP stops it from running and I get blank pages coming out of my printer. Cheers, pal.

I had diagnosed the problem but was lacking a solution. I had assumed, wrongly, that the HP code at issue was in a dynamic link library (DLL) or driver file, so I could not use the option in Windows to “whitelist” applications, to exempt them from DEP’s clutches. Windows allows you to identify safe applications (i.e. “.exe” files) which are to run with DEP disabled, but not DLLs or other files containing code.

I was wrong, though. I could keep DEP turned on but still use my printer by whitelisting the HP Deskjet Print Engine application (in my case hpzeng07.exe). All I had to do was whitelist every instance of that file on my PC. This solution works on XP and would equally apply to anyone foolhardy or masochistic enough to be running Vista. I imagine the fix will also work for any HP Deskjet, since they all use a Deskjet Print Engine application. They don’t necessarily all use the same one but the executables always have a name with the format hpzengNN.exe – it is just the number that changes.

My great thanks to Karl Erik, whoever he is, who posted the solution in a discussion forum.

Share this post :
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: