I upgraded a machine to -r12 of hardened-dev-sources, and this broke SCSI tape backups - nothing can access the device (/dev/nst0). The machine was working fine on -r4 previously. I've traced it down to this change being the possible culprit, just running a test to confirm it 100%. diff -Nuarwb linux-2.6.7-hardened-r4/drivers/scsi/st.c linux-2.6.7-hardened-r12/drivers/scsi/st.c --- linux-2.6.7-hardened-r4/drivers/scsi/st.c 2004-08-05 13:37:34.000000000 -0700 +++ linux-2.6.7-hardened-r12/drivers/scsi/st.c 2004-11-15 19:34:15.000000000 -0800 @@ -1220,7 +1220,7 @@ if (ppos != &filp->f_pos) { /* "A request was outside the capabilities of the device." */ - retval = (-ENXIO); + retval = (-ESPIPE); goto out; }
Yup, I confirm that reversing the patch below allows tape backup to work again in -r12. Could this please be put into -r13 of hardened-dev-sources?
hello?
tocharian can you take a peek at this.
Robin, after digging around a bit, the code you are referencing here is included from genpatches-base (gentoo-dev-sources). It is part of 1120-CAN-2004-0415.patch, and it seems very clear that it is here for a good reason. Reverting a security fixes doesn't seem like sane course of action. Are other distributions including the same fix as us? Does anyone see a solution that closes the vulnerability and leaves Robin with a working tape drive?
Better question, does this affect newer upstream kernels, where the security patch should be merged? This almost certainly isnt specific to hardened.
as of 2.6.8/2.6.9 (they are the same), the entire if statement I have in my patch is removed, and the code is revised very slightly. as of the upcoming 2.6.10, there is a very major revision to the st driver. Also, checking your hardened-dev-sources-2.6.7-r15, the line of troublesome code seems to be reverted anyway. So i'm suspecting it was an extranous line that made it into the 1120-CAN-2004-0415.patch somehow.
Please confirm that -r16 is working correctly. If so we can close the bug.
I'll be rebooting the box as of this friday, so I'll post back the results then.
H-d-s -r17 is out, is this issue fixed or?
Yup, -r17 works perfectly and allows my backups to work :-). Closing this as it's fixed now.