Skip site navigation (1)Skip section navigation (2)
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

--=_MailMate_037E44F4-1A1F-4BA6-832D-78B178A3D9EB_=
Content-Type: text/plain; format=flowed; markup=markdown
Content-Transfer-Encoding: quoted-printable

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=3Dca927128bf6a92abce27151fbb1ab=
112fd2a8385
>
> 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                =3D     drosih@rpi.edu
Lead Developer @rpi                   and    gad@FreeBSD.org
Rensselaer Polytechnic Institute;             Troy, NY;  USA

--=_MailMate_037E44F4-1A1F-4BA6-832D-78B178A3D9EB_=
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/xhtml; charset=3Dutf-8"=
>
</head>
<body><div style=3D"font-family: sans-serif;"><div class=3D"markdown" sty=
le=3D"white-space: normal;">
<p dir=3D"auto">Apologies for the absurdly-long line in that MFC!</p>
<p dir=3D"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=3D"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 cherr=
y-pick step.  I was expecting the editting to happen on the 'git push' st=
ep, and was quite surprised to see the commit sail right in there!  &quot=
;Yay&quot; for using the right ssh-keys, but also an &quot;oops...&quot;.=
</p>
<blockquote style=3D"margin: 0 0 5px; padding-left: 5px; border-left: 2px=
 solid #777777; color: #777777;">
<p dir=3D"auto">The branch stable/13 has been updated by gad:</p>
<p dir=3D"auto">URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D=
ca927128bf6a92abce27151fbb1ab112fd2a8385" style=3D"color: #777777;">https=
://cgit.FreeBSD.org/src/commit/?id=3Dca927128bf6a92abce27151fbb1ab112fd2a=
8385</a></p>
<p dir=3D"auto">commit ca927128bf6a92abce27151fbb1ab112fd2a8385<br>
Author:     Garance A Drosehn <a href=3D"mailto:gad@FreeBSD.org" style=3D=
"color: #777777;">gad@FreeBSD.org</a><br>
AuthorDate: 2021-12-30 20:45:13 +0000<br>
Commit:     Garance A Drosehn <a href=3D"mailto:gad@FreeBSD.org" style=3D=
"color: #777777;">gad@FreeBSD.org</a><br>
CommitDate: 2023-09-23 21:04:40 +0000</p>
<pre style=3D"margin-left: 15px; margin-right: 15px; padding: 5px; backgr=
ound-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; ma=
x-width: 90vw;"><code style=3D"margin: 0 0; border-radius: 3px; backgroun=
d-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=3D"1E5069B8-B094-48FD-8A96-D66CC42C52FB"><!DOCTYPE html><di=
v dir=3D"auto" style=3D"color: rgb(0, 0, 0); font-family: sans-serif; fon=
t-style: normal; font-variant-caps: normal; font-weight: normal; letter-s=
pacing: 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=3D"auto" style=3D"color: rgb(0, 0, 0); font-family: sans-s=
erif; font-style: normal; font-variant-caps: normal; font-weight: normal;=
 letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0=
px; text-transform: none; white-space: pre-wrap; widows: auto; word-spaci=
ng: 0px; -webkit-text-stroke-width: 0px;">Garance Alistair Drosehn       =
         =3D     drosih@rpi.edu
</div><div dir=3D"auto" style=3D"color: rgb(0, 0, 0); font-family: sans-s=
erif; font-style: normal; font-variant-caps: normal; font-weight: normal;=
 letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0=
px; text-transform: none; white-space: pre-wrap; widows: auto; word-spaci=
ng: 0px; -webkit-text-stroke-width: 0px;">Lead Developer @rpi            =
       and    gad@FreeBSD.org
</div><div dir=3D"auto" style=3D"color: rgb(0, 0, 0); font-family: sans-s=
erif; font-style: normal; font-variant-caps: normal; font-weight: normal;=
 letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0=
px; text-transform: none; white-space: pre-wrap; widows: auto; word-spaci=
ng: 0px; -webkit-text-stroke-width: 0px;">Rensselaer Polytechnic Institut=
e;             Troy, NY;  USA</div></div>
<div class=3D"markdown" style=3D"white-space: normal;">

</div>
</div>
</body>

</html>

--=_MailMate_037E44F4-1A1F-4BA6-832D-78B178A3D9EB_=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B5FF14E2-7203-4782-B6BC-EE6139931FB8>