Date: Sat, 23 Sep 2023 18:02:16 -0400 From: Garance A Drosehn <gad@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: ca927128bf6a - stable/13 - When parsing a rule to rotate log files ... MFC Message-ID: <B5FF14E2-7203-4782-B6BC-EE6139931FB8@FreeBSD.org> In-Reply-To: <202309232109.38NL94uB071348@gitrepo.freebsd.org> References: <202309232109.38NL94uB071348@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Apologies for the absurdly-long line in that MFC! The first time I tried the MFC I had modified the commit-log message to follow standard conventions, but then it turned out I had the wrong ssh-keys in effect so the 'git push' didn't work. I then redid all the steps for the MFC, this time setting up the correct ssh-keys, but then I forgot the '--edit' on the git cherry-pick step. I was expecting the editting to happen on the 'git push' step, and was quite surprised to see the commit sail right in there! "Yay" for using the right ssh-keys, but also an "oops...". > The branch stable/13 has been updated by gad: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=ca927128bf6a92abce27151fbb1ab112fd2a8385 > > commit ca927128bf6a92abce27151fbb1ab112fd2a8385 > Author: Garance A Drosehn <gad@FreeBSD.org> > AuthorDate: 2021-12-30 20:45:13 +0000 > Commit: Garance A Drosehn <gad@FreeBSD.org> > CommitDate: 2023-09-23 21:04:40 +0000 > > When parsing a rule to rotate log files on a specific week day, > parseDWM() can advance the time to the next week. If the next week > is > in the next month, then tm_mon is incremented. However, the > increment > was failing to handle the wraparound from December to January, so > when > parsing a rule during the last week of the December, the month > would > advance to month 12. This triggered an out-of-bounds read of the > mtab[] array in days_pmonth() after parseDWM() returned. To fix, > this change resets the month to January and increment the year > when > the month increment wraps. -- Garance Alistair Drosehn = drosih@rpi.edu Lead Developer @rpi and gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA [-- Attachment #2 --] <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8"> </head> <body><div style="font-family: sans-serif;"><div class="markdown" style="white-space: normal;"> <p dir="auto">Apologies for the absurdly-long line in that MFC!</p> <p dir="auto">The first time I tried the MFC I had modified the commit-log message to follow standard conventions, but then it turned out I had the wrong ssh-keys in effect so the 'git push' didn't work.</p> <p dir="auto">I then redid all the steps for the MFC, this time setting up the correct ssh-keys, but then I forgot the '--edit' on the git cherry-pick step. I was expecting the editting to happen on the 'git push' step, and was quite surprised to see the commit sail right in there! "Yay" for using the right ssh-keys, but also an "oops...".</p> <blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"> <p dir="auto">The branch stable/13 has been updated by gad:</p> <p dir="auto">URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=ca927128bf6a92abce27151fbb1ab112fd2a8385" style="color: #777777;">https://cgit.FreeBSD.org/src/commit/?id=ca927128bf6a92abce27151fbb1ab112fd2a8385</a></p> <p dir="auto">commit ca927128bf6a92abce27151fbb1ab112fd2a8385<br> Author: Garance A Drosehn <a href="mailto:gad@FreeBSD.org" style="color: #777777;">gad@FreeBSD.org</a><br> AuthorDate: 2021-12-30 20:45:13 +0000<br> Commit: Garance A Drosehn <a href="mailto:gad@FreeBSD.org" style="color: #777777;">gad@FreeBSD.org</a><br> CommitDate: 2023-09-23 21:04:40 +0000</p> <pre style="margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; max-width: 90vw;"><code style="margin: 0 0; border-radius: 3px; background-color: #F7F7F7; padding: 0px;">When parsing a rule to rotate log files on a specific week day, parseDWM() can advance the time to the next week. If the next week is in the next month, then tm_mon is incremented. However, the increment was failing to handle the wraparound from December to January, so when parsing a rule during the last week of the December, the month would advance to month 12. This triggered an out-of-bounds read of the mtab[] array in days_pmonth() after parseDWM() returned. To fix, this change resets the month to January and increment the year when the month increment wraps. </code></pre> </blockquote> </div><div id="1E5069B8-B094-48FD-8A96-D66CC42C52FB"><!DOCTYPE html><div dir="auto" style="color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">-- </div><div dir="auto" style="color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Garance Alistair Drosehn = drosih@rpi.edu </div><div dir="auto" style="color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Lead Developer @rpi and gad@FreeBSD.org </div><div dir="auto" style="color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Rensselaer Polytechnic Institute; Troy, NY; USA</div></div> <div class="markdown" style="white-space: normal;"> </div> </div> </body> </html>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B5FF14E2-7203-4782-B6BC-EE6139931FB8>
