Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 54256 invoked from network); 9 Jun 2006 20:40:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Jun 2006 20:40:39 -0000 Received: (qmail 54464 invoked by uid 500); 9 Jun 2006 20:40:37 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 54425 invoked by uid 500); 9 Jun 2006 20:40:37 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 54379 invoked by uid 99); 9 Jun 2006 20:40:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jun 2006 13:40:37 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=FUZZY_VLIUM X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jun 2006 13:40:37 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 79E7C714219 for ; Fri, 9 Jun 2006 20:39:31 +0000 (GMT) Message-ID: <7603839.1149885571495.JavaMail.jira@brutus> Date: Fri, 9 Jun 2006 20:39:31 +0000 (GMT+00:00) From: "Anders Morken (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1392) Corner case behaviour in RAFContainer#writePage() can cause invalid data to be written to data files In-Reply-To: <22741629.1149878669882.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1392?page=all ] Anders Morken updated DERBY-1392: --------------------------------- Derby Info: [Patch Available] > Corner case behaviour in RAFContainer#writePage() can cause invalid data to be written to data files > ---------------------------------------------------------------------------------------------------- > > Key: DERBY-1392 > URL: http://issues.apache.org/jira/browse/DERBY-1392 > Project: Derby > Type: Bug > Components: Store > Versions: 10.1.2.0 > Environment: Platforms that throw an IOException when writing beyond the EOF, but permit the write to proceed if the file is padded, then written. > Reporter: Anders Morken > Assignee: Anders Morken > Priority: Minor > Fix For: 10.2.0.0 > Attachments: DERBY-1392-1.patch > > java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java#writePage(...) will > attempt to retry a write if an IOException is thrown on the first attempt. However, the next > attempt does not add container header data to the first page, nor does it encrypt the data > if the database is encrypted. > I'd expect this bug to be case silent corruption of encrypted databases if the code path > was actually exercised. The fact that this bug still lives and nobody has discovered it is > possibly an indication of how uncommon this code path is. Since the comment in the code > says nothing about exactly what platforms the workaround was intended for, I don't know if > these platforms are still supported for Derby. There's also a workaround for an EPOC Java > bug earlier in the code - EPOC only had a Java 1.1 VM, which is no longer supported. > I'll attach a patch for the issue, but I wonder if we might as well remove the "retry code path" > if it is never used? > (If you're paranoid, this could also be considered a security issue. If someone could > cause IO errors for Derby at will, they could make Derby write the database without > encryption - but there are far easier ways to attack Derby if you've got that kind of > access, so I'm discounting that. =) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira